@gisce/react-ooui 1.2.0-rc.27 → 1.2.0-rc.28

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "1.2.0-rc.27",
3
+ "version": "1.2.0-rc.28",
4
4
  "files": [
5
5
  "dist",
6
6
  "src",
@@ -1,4 +1,5 @@
1
1
  import { One2manyItem } from "@/widgets/base/one2many/One2manyInput";
2
+ import { Form as FormOoui } from "@gisce/ooui";
2
3
 
3
4
  const filteredValues = (values: any, fields: any) => {
4
5
  if (!fields) {
@@ -100,15 +101,16 @@ export const getTouchedValues = ({
100
101
 
101
102
  export const checkFieldsType = ({
102
103
  changedFields,
103
- fields,
104
+ formOoui,
104
105
  types,
105
106
  }: {
106
107
  changedFields: string[];
107
- fields: any;
108
+ formOoui: FormOoui;
108
109
  types: string[];
109
110
  }) => {
110
111
  const valuesChecked = changedFields.map((key) => {
111
- return types.includes(fields[key]?.type);
112
+ const fieldType = formOoui?.findById(key)?.type!;
113
+ return types.includes(fieldType);
112
114
  });
113
115
  return valuesChecked.some((i) => i === true);
114
116
  };
@@ -695,7 +695,7 @@ function Form(props: FormProps, ref: any) {
695
695
  if (
696
696
  checkFieldsType({
697
697
  changedFields,
698
- fields,
698
+ formOoui: formOoui!,
699
699
  types: [
700
700
  "text",
701
701
  "codeeditor",