Skip to content

Commit 5e3218a

Browse files
committed
Update readme
1 parent cac7983 commit 5e3218a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,21 @@ You specify your filters array using the **key** as the filter name supplied in
220220

221221
The keys of the options you supply will be validated on select to make sure they match one of the options on the backend, otherwise it will be changed to _null_ for safety.
222222

223+
#### Alternate: Defining a filter view
224+
225+
If you want full control over your filters, you can omit the **filters()** method and instead add a **filtersView()** method that return the string view name, which will be included in the master component on render. This is useful when you have different types of filters than the package offers:
226+
227+
You can take a look as the master component markup to get ideas on how best to lay out the filters UI.
228+
229+
```php
230+
public function filtersView(): ?string
231+
{
232+
return 'path.to.my.filters.view';
233+
}
234+
```
235+
236+
If you have this defined, it will take precedence over the **filters()** method.
237+
223238
#### Defining how the filter works
224239

225240
Finally, after you configure your filters, you must add them to your query so that the table knows what to do when one is selected:

0 commit comments

Comments
 (0)