Issue with UI Refresh After Editing Data Using useQuery #867
Unanswered
asifka-ramz
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm facing an issue with a table edit using useQuery. After editing, I'm able to retrieve the latest data from the server using the refetch function and invalidate method , but unfortunately, the UI doesn't seem to refresh to reflect these changes.
Below is a snippet of the code:
//data
const productData = data?.allProductsDashboard?.edges.map((edge) => edge.node) || []
column field
{
accessorFn: (dataRow) => dataRow?.variants[0]?.price,
id: 'price',
header: t('price'),
muiEditTextFieldProps: ({ cell, row }) => ({
type: 'number',
required: true,
error: !!validationErrors?.[cell.id],
helperText: validationErrors?.[cell.id],
className: "appearance-none",
onChange: (event) => {
const validationError = !validateRequired(event.currentTarget.value)
? t('required')
: undefined;
......
and dependency like
],
Any assistance or insights would be greatly appreciated. Thank you!"
Beta Was this translation helpful? Give feedback.
All reactions