Would it be possible to disable the saved query without creating a new component in react-admin

Viewed 46

In version 4 of react-admin, the functionality to save the filter was added. I would like to know how can I disable this function without creating another filter button enter image description here

1 Answers

The Saved Queries in the sidebar, as shown in your screencast, are opt-in. It you don't want them, don't include the <SavedQueriesList /> component in your sidebar:

const PostFilterSidebar = () => (
    <Card>
        <CardContent>
-           <SavedQueriesList />
            <FilterList label="Category" icon={<CategoryIcon />}>
                ...
            </FilterList>
            <FilterList label="Published" icon={<DateRangeIcon />}>
               ...
            </FilterList>
            <FilterList label="Popularity" icon={<DateRangeIcon />}>
               ...
            </FilterList>
        </CardContent>
    </Card>
);
Related