Replies: 2 comments 4 replies
-
|
Maybe this? SelectFilter::make('type_2')->label('Type-2')
->options(Category::distinct()
->pluck('type_2', 'type_2'))
->query(
fn (Builder $query, array $data, $livewire) => $query->when(
$data['value'],
function (Builder $query) use ($data, $livewire): Builder {
$livewire->removeTableFilter('type_1');
return $query->whereRelation('category', 'type_2', $data['value']);
}
),
) |
Beta Was this translation helpful? Give feedback.
4 replies
-
|
I know this is old post but did you find a way to achieve this since @jigujigu ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
-
How to disable SelectFilter or set the value become 'all', from other SelectFilter ?.
Let say : I have 2 SelectFilters (type-1 and type-2).
I want set the value in 1st SelectFilter (type-1) to become 'all' or just disable in. If Type-2 have select any value (not 'all').
Thanks
Thanks
Beta Was this translation helpful? Give feedback.
All reactions