Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve query initial data/column handling #2933

Open
csjh opened this issue Dec 18, 2024 · 0 comments
Open

improve query initial data/column handling #2933

csjh opened this issue Dec 18, 2024 · 0 comments

Comments

@csjh
Copy link
Contributor

csjh commented Dec 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant