@dartech/arsenal-ui 1.3.88 → 1.3.89

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/index.js CHANGED
@@ -5156,7 +5156,10 @@ const CreatePropertiesList = ({
5156
5156
  control,
5157
5157
  name: fieldName,
5158
5158
  rules: {
5159
- required: required && 'Please, add properties'
5159
+ validate: val => {
5160
+ if (required && Array.isArray(val) && val.length === 0) return 'Please, fill the properties';
5161
+ return true;
5162
+ }
5160
5163
  }
5161
5164
  });
5162
5165
  const properties = useWatch({
@@ -5242,17 +5245,21 @@ const CreatePropertiesList = ({
5242
5245
  }))
5243
5246
  })]
5244
5247
  }))
5245
- }), item.id)), !hideAddButton && jsx(Grid, Object.assign({
5248
+ }), item.id)), !hideAddButton && jsxs(Grid, Object.assign({
5246
5249
  xs: 12
5247
5250
  }, {
5248
- children: jsx(Button, Object.assign({
5251
+ children: [jsx(Button, Object.assign({
5249
5252
  variant: "contained",
5250
5253
  size: "small",
5251
5254
  color: "primary",
5252
5255
  onClick: handleAddParameter
5253
5256
  }, {
5254
5257
  children: "Add property"
5255
- }))
5258
+ })), error && jsx(FormHelperText, Object.assign({
5259
+ error: true
5260
+ }, {
5261
+ children: error.root.message
5262
+ }))]
5256
5263
  }))]
5257
5264
  });
5258
5265
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.3.88",
3
+ "version": "1.3.89",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  format: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  name: string;
3
4
  label?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PropertyUnion } from '../../../interfaces';
2
3
  type PropertyItemProps = {
3
4
  property: PropertyUnion;