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
|
-
|
|
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
|
-
|
|
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
|
}
|