Fix fields widget flash during reset (#19726)
Summary - Remove the evictViewMetadataForViewIds step from the page-layout reset flow. It synchronously cleared viewFields/viewFieldGroups rows from the metadata store, leaving a window where useFieldsWidgetGroups saw a view with no fields and fell back to buildDefaultFieldsWidgetGroups, briefly rendering a synthetic "General" + "Other" layout before the real reset defaults arrived. - invalidateMetadataStore() alone is sufficient: it marks the collections stale and triggers MinimalMetadataLoadEffect to refetch, which replaces current atomically. The UI now transitions old-layout → new-default with no synthetic flash. - Simplified refreshPageLayoutAfterReset to no longer take a collectAffectedViewIds callback, and updated both tab/widget reset call sites plus ObjectLayout.tsx accordingly. - Deleted the now-unused evictViewMetadataForViewIds and collectViewIdsFromWidgets utils.
This commit is contained in:
-1
@@ -77,7 +77,6 @@ export const ObjectLayout = ({ objectMetadataItem }: ObjectLayoutProps) => {
|
||||
|
||||
await resetPageLayoutToDefault({
|
||||
pageLayoutId: pageLayout.id,
|
||||
pageLayout,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user