Is it possible to have data reloaded when a the meta data (coming from the URL route parameters) change? #6318
-
Essentially I'm reading over the multitenancy documentation https://refine.dev/docs/guides-concepts/multi-tenancy/ and I've implemented what it suggests:
The issue seems to be when I replace the tenantId parameter in the URL it doesn't actually reload the data. After looking at the examples it seems it uses the params and the tenant ID as a filter parameter in the multi tenancy strapi example. This seems to be different to the suggested approach and of course works in that scenario as the param changing causes the query key to change as the filters are changing. As far as I can tell the meta (combinedMeta) is not taken into consideration in the https://github.com/refinedev/refine/blob/master/packages/core/src/hooks/data/useList.ts#L238 Is there any way to make this work using route parameters and without specifying a filter on every usage of a useList/useOne/useMany hook? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @TomCaserta sorry for the late answer. You're right, query keys should have used the |
Beta Was this translation helpful? Give feedback.
Hey @TomCaserta sorry for the late answer. You're right, query keys should have used the
combinedMeta
. This case was overlooked in the tests and the implementation ended up using the wrong composition of themeta
variables. I'll convert this to an issue. I'm hoping to get a fix implemented and released within our next release cycle 🚀