Detect of sortable has been turn on or off on column
I want to do different things based on if a sort on a column has been turned on or off.
if the column is sorted either asc or desc, i want to update a bool variable to true on the Livewire component, if the sort is in its idle state, it want to update the variable to false.
Is there a way for me to detect this? The docs describe this callback, but cant figure out if there is an "on" and "off" option to detect?
2 Replies
maybe try
$this->tableSortColumn
and $this->tableSortDirection
for the current sorting statePerfect! thanks, that does the job!