-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/multiselect #469
Feature/multiselect #469
Conversation
Signed-off-by: Julio Renzi C. Motol <[email protected]>
Signed-off-by: Julio Renzi C. Motol <[email protected]>
Signed-off-by: Julio Renzi C. Motol <[email protected]>
Signed-off-by: Julio Renzi C. Motol <[email protected]>
Signed-off-by: Julio Renzi C. Motol <[email protected]>
Doesn't seem to work for me, same issues I was having with the other PR: Screen.Recording.2021-09-28.at.16.02.02.mov |
How is your table set up? |
class MotorcycleTable extends DataTableComponent
{
public function query()
{
return Motorcycle::query()
->when($this->getFilter('brands'), fn($query, $brands) => $query->whereIn('brand', $brands));
}
public function filters(): array
{
return [
'brands' => Filter::make('Brand')
->multiSelect(Motorcycle::distinct()->pluck('brand', 'brand')->toArray()),
];
}
public function columns(): array
{
return [
Column::make('Brand')
->sortable(),
Column::make('Model')
->sortable(),
Column::make('Displacement')
->sortable(),
];
}
} Also, I'm using |
I see, I dont think |
No definitely not, that's just what was breaking it for me. I'll look this over soon in detail and get it merged if all is well. |
Continuation of #441