Closed aesqe closed 1 year ago
Hello and thank you for this wonderful library! It's super easy to use and very performant.
My question is: is there a way to update the query in the useMany hook?
useMany
It seems it will only re-query the data when something is changed in the DB, as it's using watch.
watch
My use case is having a checkbox to toggle the display of deleted items, e.g.:
export const useItems = (includeDeleted = true) => { const itemsTable = useTable((model: Model) => model.items) const query = includeDeleted ? {} : { where: { deleted: false } } const { data, error, state } = useMany(itemsTable, query) return data }
But the data is always the same as the first returned values.
Is this expected? Or am I doing something wrong?
Thank you very much in advance! 🙇
No, this should work, BlinkDB is doing something wrong here :) I'll take a look, this seems like a quick fix.
Now fixed in the latest release
@froehlichA great, thank you very much! 🙂
Hello and thank you for this wonderful library! It's super easy to use and very performant.
My question is: is there a way to update the query in the
useMany
hook?It seems it will only re-query the data when something is changed in the DB, as it's using
watch
.My use case is having a checkbox to toggle the display of deleted items, e.g.:
But the data is always the same as the first returned values.
Is this expected? Or am I doing something wrong?
Thank you very much in advance! 🙇