Closed WangLarry closed 1 year ago
@WangLarry please fill out the issue template and describe the issue in terms of reproduction steps, expected behavior and actual behavior. Once we understand the root of your problem we can think of an appropriate fix.
If query's 'enabled' attribute value bind an expression, which can turn on/off this query. But when disabled(turn off) it, the result still show previous data(not show: no rows)
turning off the "enabled" option prevents the query from making fetches. If it has cached data it will still show it. If that's not what you want, perhaps you could update the binding to something like queryEnabledCondition ? query. data : []
.
We'll be working on cache control in the future: https://github.com/mui/mui-toolpad/issues/1093
Duplicates
Latest version
Current behavior 😯
fix: toolpad-core/useDataQuery.ts
Expected behavior 🤔
after:
https://user-images.githubusercontent.com/5869244/193463385-5d251798-ca71-45cd-a960-cf9d7b40efa8.mov
Steps to reproduce 🕹
Steps:
1. 2. 3. 4.
Context 🔦
No response
Your environment 🌎
No response