Fix 5598 - View field creation (#5732)

- Fix duplicate view field creation
- Fix redirect to proper settings data model page
- Refetch view fields after field creation (temporary solution)

Fixes  https://github.com/twentyhq/twenty/issues/5598
This commit is contained in:
Lucas Bordeau
2024-06-04 15:10:56 +02:00
committed by GitHub
parent c5d5d18347
commit 5e32cb215e
5 changed files with 63 additions and 132 deletions

View File

@ -78,6 +78,7 @@ export const usePersistViewFieldRecords = () => {
const updateViewFieldRecords = useCallback(
(viewFieldsToUpdate: ViewField[]) => {
if (!viewFieldsToUpdate.length) return;
return Promise.all(
viewFieldsToUpdate.map((viewField) =>
apolloClient.mutate({