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) { return x.value === autocompleteValue_1; })) !== null && _c !== void 0 ? _c : '', clearOnEscape: true, fullWidth: true, disableCloseOnSelect: fieldDefinition.multiple, readOnly: fieldDefinition.readOnly, renderInput: function (params) {
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
- var newValue = Number(event.target.value);
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 : "", onChange: function (event) {
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;
@@ -68,6 +68,7 @@ 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;
71
72
  min?: number;
72
73
  max?: number;
73
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.205-dev",
3
+ "version": "2.1.206-dev",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",