File tree 2 files changed +13
-2
lines changed
src/frontend/views/entity/Crud
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
/// <reference types="next" />
2
2
/// <reference types="next/image-types/global" />
3
+
4
+ // NOTE: This file should not be edited
5
+ // see https://nextjs.org/docs/basic-features/typescript for more information.
Original file line number Diff line number Diff line change 1
1
import { Tabs , SectionBox } from "@adminator/chromista" ;
2
2
import noop from "lodash/noop" ;
3
3
import { useEffect , useState } from "react" ;
4
- import { ENTITY_TABLE_PATH } from "frontend/hooks/data/data.store" ;
4
+ import {
5
+ ENTITY_LIST_PATH ,
6
+ ENTITY_TABLE_PATH ,
7
+ } from "frontend/hooks/data/data.store" ;
5
8
import { SLUG_LOADING_VALUE , useRouteParam } from "@adminator/protozoa" ;
6
9
import { IEntityCrudSettings } from "shared/configuration.constants" ;
7
10
import { useSetPageDetails , useChangeRouterParam } from "frontend/lib/routing" ;
@@ -63,7 +66,12 @@ function useEntityCrudView() {
63
66
64
67
const upsertDetailsColumnsMutation = useUpsertConfigurationMutation (
65
68
"hidden_entity_details_columns" ,
66
- entity
69
+ entity ,
70
+ {
71
+ /* This is an hack for ENTITY_DETAILS_PATH(entity, id) to clear all details
72
+ and it quite necessary for the detail page */
73
+ otherEndpoints : [ ENTITY_LIST_PATH ( entity ) ] ,
74
+ }
67
75
) ;
68
76
69
77
const upsertCrudSettingsMutation = useUpsertConfigurationMutation (
You can’t perform that action at this time.
0 commit comments