paul_89142
paul_89142
FFilament
Created by paul_89142 on 8/24/2023 in #❓┊help
Call Component function from Action button
previously i was doing more in that method so arrow function wasn't viable but have now simplified it so that does work 😄 awesome.
11 replies
FFilament
Created by paul_89142 on 8/24/2023 in #❓┊help
Call Component function from Action button
does work
11 replies
FFilament
Created by paul_89142 on 8/24/2023 in #❓┊help
Call Component function from Action button
hmm.. ok cool can confirm by using arrow functions
->action(fn (Media $record) => $this->setSrc($record))
->action(fn (Media $record) => $this->setSrc($record))
11 replies
FFilament
Created by paul_89142 on 8/24/2023 in #❓┊help
Call Component function from Action button
There is a scope issue where you cant access $this from the anonymous function closure being passed into ->action(). Using arrow functions might work around that as it would normally allow access to parent variables but $this might be slightly different in this context (i havent tested it tbf let me have a quick go now)
11 replies
FFilament
Created by paul_89142 on 8/24/2023 in #❓┊help
Call Component function from Action button
yeah.. using the $parent = $this; and then calling $parent->setSrc() does now seem to be working, just feels very hacky - lol
11 replies
FFilament
Created by paul_89142 on 8/24/2023 in #❓┊help
Call Component function from Action button
custom livewire component. Not in the filament panel / admin system 🙂
11 replies