Disable Toggle Column by button
i have toggle column and i want to if i click the button click it will disable the toggle column, i have to tried to make function with button on livewire but its not working, this my code
this my function to handle click
public function lockdataTable()
{
$this->lockdata = !$this->lockdata;
}
this my code of the toggle column
ToggleColumn::make('mengajukan_rpl')->label('Mengajukan RPL')->disabled($this->lockdata),
i havent idea again, maybe someone can help me for fix my isue, thanks
Solution:Jump to solution
i have toggle column and i want to if i click the button click it will disable the toggle column, i have to tried to make function with button on livewire but its not working, this my code
this my function to handle click
public function lockdataTable()
{
$this->lockdata = !$this->lockdata;...
5 Replies
Maybe you don't need the function, I think this can work:
->disabled(fn ($state) => $state === true)
I want to setting the lock button on my page not on my database, hopefully this function lock will open next steps so if lock button not clicked the next steps can't show.
Just do:
I think
$state
is not injected in the disabled()
callback of a column
What are the "next steps"? Do you have a form with a Wizard on the same page or something?Thanks for answered my question, actually I have solution for handle that. Thank you very much for responded π.