@pdg/react-form 1.0.83 → 1.0.85
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.
- package/dist/index.esm.js +9 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2797,10 +2797,13 @@ styleInject(css_248z$j);var FormTag = React__default.forwardRef(function (_a, re
|
|
|
2797
2797
|
/********************************************************************************************************************
|
|
2798
2798
|
* State - value
|
|
2799
2799
|
* ******************************************************************************************************************/
|
|
2800
|
-
var _c = useState(function () {
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2800
|
+
var _c = useState(function () { return getFinalValue(initValue || []); }), value = _c[0], setValue = _c[1];
|
|
2801
|
+
var _d = useState(function () { return new Set(getFinalValue(initValue || [])); }), valueSet = _d[0], setValueSet = _d[1];
|
|
2802
|
+
useFirstSkipEffect$1(function () {
|
|
2803
|
+
setValue(getFinalValue(initValue || []));
|
|
2804
|
+
setValueSet(new Set(getFinalValue(initValue || [])));
|
|
2805
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2806
|
+
}, [initValue]);
|
|
2804
2807
|
useFirstSkipEffect$1(function () {
|
|
2805
2808
|
if (error)
|
|
2806
2809
|
validate(value);
|
|
@@ -4305,7 +4308,7 @@ NumberFormatCustom.displayName = 'NumberFormatCustom';var FormNumberDefaultProps
|
|
|
4305
4308
|
/********************************************************************************************************************
|
|
4306
4309
|
* State
|
|
4307
4310
|
* ******************************************************************************************************************/
|
|
4308
|
-
var className = _a.className, allowNegative = _a.allowNegative, thousandSeparator = _a.thousandSeparator, allowDecimal = _a.allowDecimal, decimalScale = _a.decimalScale, prefix = _a.prefix, suffix = _a.suffix, readOnly = _a.readOnly, tabIndex = _a.tabIndex, initMuiInputProps = _a.InputProps, initInputProps = _a.inputProps, initValue = _a.value, onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate, props = __rest$4(_a, ["className", "allowNegative", "thousandSeparator", "allowDecimal", "decimalScale", "prefix", "suffix", "readOnly", "tabIndex", "InputProps", "inputProps", "value", "onChange", "onValue", "onValidate"]);
|
|
4311
|
+
var className = _a.className, allowNegative = _a.allowNegative, thousandSeparator = _a.thousandSeparator, allowDecimal = _a.allowDecimal, decimalScale = _a.decimalScale, prefix = _a.prefix, suffix = _a.suffix, readOnly = _a.readOnly, tabIndex = _a.tabIndex, labelShrink = _a.labelShrink, initMuiInputProps = _a.InputProps, initInputProps = _a.inputProps, initValue = _a.value, onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate, props = __rest$4(_a, ["className", "allowNegative", "thousandSeparator", "allowDecimal", "decimalScale", "prefix", "suffix", "readOnly", "tabIndex", "labelShrink", "InputProps", "inputProps", "value", "onChange", "onValue", "onValidate"]);
|
|
4309
4312
|
var _b = useState(function () { return (empty(initValue) ? '' : "".concat(initValue)); }), strValue = _b[0], setStrValue = _b[1];
|
|
4310
4313
|
/********************************************************************************************************************
|
|
4311
4314
|
* Effect
|
|
@@ -4374,7 +4377,7 @@ NumberFormatCustom.displayName = 'NumberFormatCustom';var FormNumberDefaultProps
|
|
|
4374
4377
|
/********************************************************************************************************************
|
|
4375
4378
|
* Render
|
|
4376
4379
|
* ******************************************************************************************************************/
|
|
4377
|
-
return (React__default.createElement(FormTextField, __assign$7({ ref: ref, className: classNames$1(className, 'FormNumber'), disableReturnKey: true, InputProps: muiInputProps, readOnly: readOnly, value: strValue, onChange: handleChange, onValue: handleValue, onValidate: handleValidate }, props)));
|
|
4380
|
+
return (React__default.createElement(FormTextField, __assign$7({ ref: ref, className: classNames$1(className, 'FormNumber'), disableReturnKey: true, labelShrink: strValue === '' || strValue === undefined ? labelShrink : true, InputProps: muiInputProps, readOnly: readOnly, value: strValue, onChange: handleChange, onValue: handleValue, onValidate: handleValidate }, props)));
|
|
4378
4381
|
});
|
|
4379
4382
|
FormNumber.displayName = 'FormNumber';
|
|
4380
4383
|
FormNumber.defaultProps = FormNumberDefaultProps;var FormSearchDefaultProps = __assign$7({}, FormTextDefaultProps);var css_248z$h = ".FormSearch input[type=search]::-webkit-search-decoration,\n.FormSearch input[type=search]::-webkit-search-cancel-button,\n.FormSearch input[type=search]::-webkit-search-results-button,\n.FormSearch input[type=search]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n}";
|