mona
filter inside liveware in v3 - how to get filter state?
in liveware how to design a filter and get its state ?
i have designed a filter inside liveware in filament-v2 and i was getting the state also inside getTableQuery() by using getTableFilters function (provided below)
$month_selected = $this->getTableFilterState("attendance_month")["value"];
but after upgrading to v3 i am not getting filter state .
to check i have provided some customized code like below inside filters of table in liveware .
SelectFilter::make('attendance_month')
->options([
'January' => 'January',
'February' => 'February',
'March' => 'March',
]),
and then inside getTablequery function i have provide below code
$month_selected = $this->table->getFilters();
after it when i tried to check dump($month_selected);
i am getting below result instead of specific optioin which i have choosen.
"attendance_month" => Filament\Tables\Filters\SelectFilter {#3379 ▶}
if anyone knows how to fix this , please assist me further .
8 replies