evidence
evidence copied to clipboard
improve query initial data/column handling
Right now, a major source of SSR and general loading bugs is from forgetting to specify knownColumns and initialData in the query definition. This is in no small part due to the weird requirement for the user to specify it, instead of it being handled internally - the users aren't directly writing to the SSR cache, but for some reason, they have to manually read from it
The fix to this is having some mechanism for setting or otherwise providing Query with $page.data.data, so instead of this:
const { results, update } = buildReactiveInputQuery(
{ value, data, label, order, where },
`ButtonGroup-${name}`,
$page?.data?.data[`ButtonGroup-${name}_data`]
);
it would be this:
const { results, update } = buildReactiveInputQuery(
{ value, data, label, order, where },
`ButtonGroup-${name}`
);
not even sure buildReactiveInputQuery works right now considering it doesn't read knownColumns