> For the complete documentation index, see [llms.txt](https://boredprogrammers.gitbook.io/laragrid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boredprogrammers.gitbook.io/laragrid/filter-reset-button/usage.md).

# Usage

To use the `FilterResetButton`, you need to include it in the `getFilterResetButton` method of your grid class. Here is an example:

```php
use BoredProgrammers\LaraGrid\Filters\FilterResetButton;

class MyGrid extends BaseLaraGrid
{
    protected function getFilterResetButton(): array
    {
        return FilterResetButton::make()
            ->setRenderer(function () {
                return view('my-grid.filter-reset-button');
            })
            ->setRenderer(fn() => 'Reset button')
            ->setRenderer(function() {
                return "<b>Reset button</b>";
            })
            ->setAttributes([
                'id' => 'my-custom-id',
                'data-foo' => 'bar',
            ]);
    }
}
```

In this example, `FilterResetButton::make()` creates an instance of the `FilterResetButton` component. This button will be added to the grid.
