Usage

Filters are used in the getColumns method of your Livewire component to define the filters for the columns in the grid. The filters are applied to the data source based on the user's input.

protected function getColumns(): array
{
    return [
        Column::make('id', 'ID'),
        Column::make('name', 'Name')->setFilter(TextFilter::make()),
        Column::make('status', 'Status')->setFilter(SelectFilter::make()->setOptions([
            'active' => 'Active',
            'inactive' => 'Inactive',
        ])),
        Column::make('created_at', 'Created At')->setFilter(DateFilter::make()),
        // Add more columns as needed
    ];
}

Last updated