@dartech/arsenal-ui 1.4.45 → 1.4.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +6 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -328,6 +328,9 @@ const ControlInput = _a => {
328
328
  minRows: textarea ? 3 : 1,
329
329
  value: value !== null && value !== void 0 ? value : '',
330
330
  onChange: customOnChange ? customOnChange : onChange,
331
+ InputLabelProps: {
332
+ shrink: !!textFieldProps.placeholder
333
+ },
331
334
  inputProps: Object.assign(Object.assign({}, (_b = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputProps) !== null && _b !== void 0 ? _b : {}), {
332
335
  value: value !== null && value !== void 0 ? value : ''
333
336
  })
@@ -2506,7 +2509,9 @@ const ControlNumberInput = _a => {
2506
2509
  rules: {
2507
2510
  required: required ? textError.required : false,
2508
2511
  validate: val => {
2509
- if (val === null || val === 0) return true;
2512
+ if (val === null || val === 0) {
2513
+ return required ? textError.required : true;
2514
+ }
2510
2515
  if (decimal && !floatsOnly.test(val) || /^-*0+$/.test(val)) {
2511
2516
  return textError.notValidNumber;
2512
2517
  } else if (!decimal && !digitsOnly.test(val)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.45",
3
+ "version": "1.4.46",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"