awing-library 2.1.221-dev → 2.1.222-dev

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.
@@ -128,13 +128,11 @@ function DataInput(props) {
128
128
  }, [type, value]);
129
129
  var handleParamValueChange = function () {
130
130
  var newValue = Number(numberValue);
131
- onChange(newValue, checkValidationValue(fieldDefinition, newValue));
131
+ setNumberValue(newValue);
132
+ if (type === 'number' && Number(value) !== newValue) {
133
+ onChange(newValue, checkValidationValue(fieldDefinition, newValue));
134
+ }
132
135
  };
133
- (0, react_2.useEffect)(function () {
134
- if (type === 'number' && Number(value) !== Number(numberValue))
135
- handleParamValueChange();
136
- // eslint-disable-next-line react-hooks/exhaustive-deps
137
- }, [numberValue, type]);
138
136
  switch (type) {
139
137
  case 'logic-expression': {
140
138
  return ((0, jsx_runtime_1.jsx)(LogicExpression_1.default, __assign({ cf: function (newValue, valid) {
@@ -216,7 +214,8 @@ function DataInput(props) {
216
214
  return ((0, jsx_runtime_1.jsx)(AWING_1.NumberFormat, __assign({ id: fieldName.toString(), name: fieldName.toString(), fullWidth: true, variant: "standard" }, other, { value: numberValue !== null && numberValue !== void 0 ? numberValue : '', onChange: function (event) {
217
215
  var newValue = event.target.value;
218
216
  setNumberValue(newValue);
219
- }, error: error, helperText: !disableHelperText && error
217
+ onChange(Number(newValue), checkValidationValue(fieldDefinition, Number(newValue)));
218
+ }, onBlur: handleParamValueChange, error: error, helperText: !disableHelperText && error
220
219
  ? (_h = fieldDefinition.helperText) !== null && _h !== void 0 ? _h : t('Common.InvalidData')
221
220
  : '' })));
222
221
  }
@@ -68,7 +68,6 @@ export interface NumberFieldDefinition<T extends DataObject> extends BaseFieldDe
68
68
  onValidate?(value?: number): boolean;
69
69
  defaultValue?: number;
70
70
  autoFormula?: string;
71
- isFloat?: boolean;
72
71
  min?: number;
73
72
  max?: number;
74
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.221-dev",
3
+ "version": "2.1.222-dev",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",