# RSC Mode Filtering Overview

In server-side scenarios, filtering is enabled the same as in [the client mode of the Grid](https://www.telerik.com/kendo-react-ui/components/grid/filtering), but it relies on [server actions](https://www.telerik.com/kendo-react-ui/components/grid/rsc-mode/server-actions). When users apply filters, the server takes responsibility for maintaining and processing the filter criteria.

<CtaPanelOverview></CtaPanelOverview>

Each time a filter is changed, the [`onFilterChange`](https://www.telerik.com/kendo-react-ui/components/grid/api/gridprops#onfilterchange) callback is fired. In the RSC mode of the Grid, this callback must be declared as `async` and must start with `'use server'`. This ensures the filtering logic executes on the server.

Since filters are managed on the server (for example, using cookies), it is important to persist the filtering state correctly to maintain consistency across page reloads.

```tsx
const onFilterChange = async (event: ServerEvent<GridFilterChangeEvent>) => {
    'use server';
    const filterState = event.filter;

    cookies().set(TAG, JSON.stringify(filterState)); // Store the current filter state
};

return <Grid onFilterChange={onFilterChange} filterable={true}></Grid>;
```

You can see how to handle filtering changes on the server for consistent state persistence in the demo below.

[Demo Source](https://demos.telerik.com/kendo-react-ui/grid/server-components/filtering/source.txt)

## Suggested Links

* [KendoReact Grid Filtering Documentation](https://www.telerik.com/kendo-react-ui/components/grid/filtering)
* [KendoReact Grid RSC Mode Server Actions](https://www.telerik.com/kendo-react-ui/components/grid/rsc-mode/server-actions)
* [КendoReact Grid RSC Mode Overview](https://www.telerik.com/kendo-react-ui/components/grid/rsc-mode)
* [Getting Started with КendoReact Grid RSC Mode](https://www.telerik.com/kendo-react-ui/components/grid/getting-started/get-started-rsc)
