diff --git a/docs/useList.md b/docs/useList.md index aff6c512d1d..4a172204842 100644 --- a/docs/useList.md +++ b/docs/useList.md @@ -242,3 +242,21 @@ const { refetch, // a function that throws an error, as refetch doesn't make sense for local data } = getGetList({ data }); ``` +## `setCustomFilter` + +Property for custom filter definition. Being able to apply more complex filters using operators + +```jsx +const { data } = useList({ + data: [ + { id: 1, name: 'Arnold' }, + { id: 2, name: 'Sylvester' }, + { id: 3, name: 'Jean-Claude' }, + ], + sort: { field: 'name', order: 'ASC' }, + setCustomFilter: (record) => record.id > 1 && record.name !== 'Jean-Claude' +}); +// data will be +// [ +// { id: 2, name: 'Sylvester' }, +// ] \ No newline at end of file