livewire-datatables
livewire-datatables copied to clipboard
Editable Boolean
I have a Boolean column in my datatable showing a check mark or an 'x' based on the value in the database. I was wondering if there was a way to edit this so that if I were to click on either the check mark or x, then the value in the database would change.
When I add the editable() attribute, the column just shows a 1 or nothing at all and I have to manually type the value that I would like to change it to.
Nevermind, I was able to accomplish this by using the boolean.blade.php file as a template on a callback function.
Nevermind, I was able to accomplish this by using the boolean.blade.php file as a template on a callback function.
May I know the sample code to accomplish this ? Cuz I tried both the callback function and the view function but still cannot make it right :(