stormy-gold
stormy-gold2y ago

Hello to everyone!

I would like to understand if it's possible to add filter params to URL in the List view. I want to make the ability for users to copy link with filter params and share with somebody. I use airtable as data provider and refine-antd for layout. Also use TableFilter from this example https://refine.dev/docs/examples/table/antd/tableFilter/ Please help me if somebody already made it or share some ideas how is it possible to do. Thank you!
Table Filter | refine
The Table Filter option allows you to apply filters to the data in your table. The example below demonstrates how you might filter and display data in your table based on certain field parameters.
3 Replies
harsh-harlequin
harsh-harlequin2y ago
Hi @ludagladush, you can use syncWithLocation prop.
const { tableProps } = useTable<IPost>({
syncWithLocation:true
});
const { tableProps } = useTable<IPost>({
syncWithLocation:true
});
also,if you can set this feature globally too https://refine.dev/docs/api-reference/core/components/refine-config/#syncwithlocation
const App: React.FC = () => {
return (
<Refine
...
options={{ syncWithLocation: true }}
/>
);
};
const App: React.FC = () => {
return (
<Refine
...
options={{ syncWithLocation: true }}
/>
);
};
stormy-gold
stormy-gold2y ago
Wow! Thank you so much! It works👍
harsh-harlequin
harsh-harlequin2y ago
I'm glad to hear that, your welcome 🙏