in useTable updated field is not getting displayed ..
in useTable updated field is not getting displayed . if i refresh its showing
3 Replies
fascinating-indigo•3y ago
Hey 👋 does your form and list using same resource name?
other-emeraldOP•3y ago
yeah
speciality name is nested inside two tables
and am updating it using useUpdate Hook that is another resourse
metaData: {
fields: [
"id",
"title",
"first_name",
"last_name",
"designation_id",
"date_of_birth",
"blood_group",
"mobile",
"email",
"joining_date",
"years_of_experience",
"nationality",
"role",
"department_id",
"sub_department_id",
"gender",
"address_line_1",
"address_line_2",
"city",
"state",
"country",
"postcode",
"known_languages",
"organization_unit_id",
"image_url",
{ organization_unit: ["unit_name"] },
{
staff_documents: [
"id",
"document_type",
"document_url",
"document_no",
],
},
{ staff_speciality_mappings: ["id", { speciality: ["id", "name"] }] },
],
},
updateStaffSpeciality({
resource: "staff_speciality_mappings",
values: obj,
}); this
this is the resourse am updating it
after this i want to reload table props of another resourse that is staffs
updateStaffSpeciality(
{
resource: "staff_speciality_mappings",
values: obj,
},
{
onSuccess() {
console.log(">>>>>>>>>>>>>>");
refetch();
},
}
);
on succcess am not able to refetch
tableQueryResult: { refetch } = useTable() of antd
other-emerald•3y ago
Hi @rehan1, you can use https://refine.dev/docs/api-reference/core/hooks/invalidate/useInvalidate/