Oi
Oi
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
(I marked the solution to the original question)
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
thank you so much, both of you @dissto & @CodeWithDennis
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
it works
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
man, you guys are too smart
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
afterStateHydrated actually works, but now yet another problem arises. As I said before I don't want to save the aaa field. How do I exclude it from the data? It's only purpose is basically executing some arbitrary code.
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
I thought the other person suggested this for the first problem I had
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
I'll try this
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
idk how to explain it really
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
Not really, basically the toggle basically just serves as an action, but on the edit page in the form of a toggle. The toggle is not bound to a field on the model but instead gets it's state and action from arbitrary code in closures.
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
I have no doubt that what I'm trying to do; I'm doing it wrong, but at this point I just want it to work 😭
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
basically just trying to change the initial state of the toggle column, since it isn't bound to a field of any model
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
hmmm
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
Dennis already solved this part, I just had to add live to it.
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
is it actually possible?
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
I tried using ->state for this before but I just kept getting the error
Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
yeah that makes sense actually
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
😭 oh
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
currently on an edit page
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
maybe you just can't use a closure
53 replies
FFilament
Created by Oi on 2/24/2024 in #❓┊help
Can you customise the behaviour of a toggle component?
i.e.
->default(function () use ($form) {
return true;
->default(function () use ($form) {
return true;
53 replies