awing-library 2.1.205-dev → 2.1.206-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.
|
@@ -123,7 +123,9 @@ function DataInput(props) {
|
|
|
123
123
|
? fieldDefinition.options.filter(function (x) {
|
|
124
124
|
return (autocompleteValue_1 !== null && autocompleteValue_1 !== void 0 ? autocompleteValue_1 : []).includes(x.value);
|
|
125
125
|
})
|
|
126
|
-
: (_c = fieldDefinition.options.find(function (x) {
|
|
126
|
+
: (_c = fieldDefinition.options.find(function (x) {
|
|
127
|
+
return x.value === autocompleteValue_1;
|
|
128
|
+
})) !== null && _c !== void 0 ? _c : '', clearOnEscape: true, fullWidth: true, disableCloseOnSelect: fieldDefinition.multiple, readOnly: fieldDefinition.readOnly, renderInput: function (params) {
|
|
127
129
|
var _a;
|
|
128
130
|
return ((0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, params, other, { variant: "standard", error: error, helperText: !disableHelperText && error
|
|
129
131
|
? (_a = fieldDefinition.helperText) !== null && _a !== void 0 ? _a : t('Common.InvalidData')
|
|
@@ -174,7 +176,10 @@ function DataInput(props) {
|
|
|
174
176
|
}
|
|
175
177
|
case 'number': {
|
|
176
178
|
return ((0, jsx_runtime_1.jsx)(AWING_1.NumberFormat, __assign({ id: fieldName.toString(), name: fieldName.toString(), fullWidth: true, variant: "standard" }, other, { value: value !== null && value !== void 0 ? value : '', onChange: function (event) {
|
|
177
|
-
|
|
179
|
+
// let newValue = Number(event.target.value)
|
|
180
|
+
var newValue = fieldDefinition.isFloat
|
|
181
|
+
? event.target.value
|
|
182
|
+
: Number(event.target.value);
|
|
178
183
|
onChange(newValue, checkValidationValue(fieldDefinition, newValue));
|
|
179
184
|
}, error: error, helperText: !disableHelperText && error
|
|
180
185
|
? (_h = fieldDefinition.helperText) !== null && _h !== void 0 ? _h : t('Common.InvalidData')
|
|
@@ -198,7 +203,7 @@ function DataInput(props) {
|
|
|
198
203
|
} })));
|
|
199
204
|
}
|
|
200
205
|
case 'select': {
|
|
201
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.TextField, __assign({ id: fieldName.toString(), name: fieldName.toString(), fullWidth: true, select: true, variant: "standard", value: value !== null && value !== void 0 ? value :
|
|
206
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.TextField, __assign({ id: fieldName.toString(), name: fieldName.toString(), fullWidth: true, select: true, variant: "standard", value: value !== null && value !== void 0 ? value : '', onChange: function (event) {
|
|
202
207
|
var newValue = fieldDefinition.multiple
|
|
203
208
|
? event.target.value.split(',')
|
|
204
209
|
: event.target.value;
|