Default Values of Filter panel of form being lost even though UI reflects a value

Hey guys wondering if you can help me We have a Page with a table and a filter form. We are setting some default / initial filters for the form which works fine in the attached image you can see all the filter values are not being attached to the query. even though in the UI the form shows it has value as per the second image UPDATE: Ok so using initial values is working in the filter form.
No description
No description
7 Replies
passive-yellow
passive-yellow2y ago
So i have set the initial values using variables like this, but the checkbox value isnt being added to the query
No description
No description
passive-yellow
passive-yellow2y ago
No description
passive-yellow
passive-yellow2y ago
Am i doing the wrong thing trying to control the first load data through the filter panel?
Omer
Omer2y ago
Hey @ben_g. 👋, Try this, add initialFilter to your useTable and set your form's defaultValues ​​from useTable filters ⚡️ Example: https://github.com/pankod/refine/blob/next/examples/fineFoods/admin/antd/src/pages/orders/list.tsx#L292
GitHub
refine/list.tsx at next · pankod/refine
Build your React-based CRUD applications, without constraints. - refine/list.tsx at next · pankod/refine
passive-yellow
passive-yellow2y ago
Hey Thanks @Omer, that's awesome, i ended up doing something like this adding the initialFilterValues in the main table section and then drilling them into the filter panel inputs
No description
No description
passive-yellow
passive-yellow2y ago
Legend! i really like it. Im going to steal .. i mean borrow this