->action can not be used with ->visible on Resource View Page, why?
I noticed that if you use ->visible on Action it can not be used together with ->action clousure. Why action is never triggered in that case? ->url() works just fine but not action.
19 Replies
yes it can? code?
share your code..
the second action works, the first one is the problem. as soon as I remove early returns it works
but I need them
@Leandro Ferreira any ideas?
are they headerActions?
yes the same result if I use getHeaderActions()
what happens if you return only true in the visible method?
it works as expected if I do that
the problem is when I use early return for some reason
yep, are you using query params in the page?
https://livewire.laravel.com/docs/url#basic-usage
Laravel
URL Query Parameters | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
yes
for the token detection
@Leandro Ferreira any ideas what might be causing it?
Did you try this?
and use
$this->token
?what I'm doing at the moment is this:
Should I be using $this->token instead to get actions to work? Let me try.
yes
no it does not work with $this
only with $request in my case
is there
?token=xxx
in the url?yes of course
this does not work:
but this works:
actually even this works:
the moment you do early return the action does not kick in at all
weird, this should work
ok it work with the following:
strange it does not with traditional functions tough
weird.. but does it work?
Looks like it I need to test it further. Ill report back when Im sure it does
Thank you for your time!