@gisce/react-ooui 2.0.0-alpha.51 → 2.0.0-alpha.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"FormModal.d.ts","sourceRoot":"","sources":["../../../src/widgets/modals/FormModal.tsx"],"names":[],"mappings":"AAEA,OAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMvD,KAAK,cAAc,GAAG,SAAS,GAAG;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,4CAyG9C,CAAC"}
1
+ {"version":3,"file":"FormModal.d.ts","sourceRoot":"","sources":["../../../src/widgets/modals/FormModal.tsx"],"names":[],"mappings":"AAEA,OAAa,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMvD,KAAK,cAAc,GAAG,SAAS,GAAG;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,4CA4G9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "2.0.0-alpha.51",
3
+ "version": "2.0.0-alpha.53",
4
4
  "engines": {
5
5
  "node": "20.5.0"
6
6
  },
@@ -36,7 +36,7 @@
36
36
  "@gisce/fiber-diagram": "^1.1.0-rc.3",
37
37
  "@gisce/ooui": "1.0.0-alpha.21",
38
38
  "@gisce/react-formiga-components": "^1.0.9-rc.21",
39
- "@gisce/react-formiga-table": "1.0.0-alpha.7",
39
+ "@gisce/react-formiga-table": "1.0.0-alpha.8",
40
40
  "@monaco-editor/react": "^4.4.5",
41
41
  "@tabler/icons-react": "^2.11.0",
42
42
  "antd": "^5.5.2",
@@ -26,20 +26,22 @@ export const FormModal = (props: FormModalProps) => {
26
26
  ...rest
27
27
  } = props;
28
28
 
29
+ const { model } = rest;
30
+
29
31
  const { modalWidth } = useWindowDimensions();
30
32
  const [formTitle, setFormTitle] = useState<string>(title!);
31
33
  const [isFavourite, setIsFavourite] = useState(false);
32
34
  const [currentShortcutId, setCurrentShortcutId] = useState<number>();
35
+ const { action_id, res_id, action_type, view_id } = actionData || {};
33
36
 
34
37
  useEffect(() => {
35
38
  if (isMenuAction) {
36
39
  checkFavourite();
37
40
  }
41
+ // eslint-disable-next-line react-hooks/exhaustive-deps
38
42
  }, [actionData, isMenuAction]);
39
43
 
40
44
  async function checkFavourite() {
41
- const { action_id, res_id, action_type, view_id } = actionData;
42
-
43
45
  const result = await ConnectionProvider.getHandler().isShortcutFavorite({
44
46
  action_id,
45
47
  action_type,
@@ -109,6 +111,7 @@ export const FormModal = (props: FormModalProps) => {
109
111
  maskClosable={false}
110
112
  >
111
113
  <Form
114
+ key={`${model}-${id}-${action_id}-${res_id}-${action_type}-${view_id}-${title}`}
112
115
  id={id}
113
116
  showFooter={true}
114
117
  insideButtonModal={buttonModal}