@measured/puck 0.11.2 → 0.11.3-canary.487ab83
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +8 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -33114,14 +33114,16 @@ var InputOrGroup = (_a) => {
|
|
33114
33114
|
var _b = _a, { onChange } = _b, props = __objRest(_b, ["onChange"]);
|
33115
33115
|
const { name, field, value, readOnly } = props;
|
33116
33116
|
const [localValue, setLocalValue] = (0, import_react31.useState)(value);
|
33117
|
-
const
|
33118
|
-
|
33119
|
-
|
33120
|
-
|
33121
|
-
|
33122
|
-
|
33117
|
+
const onChangeDb = (0, import_use_debounce2.useDebouncedCallback)(
|
33118
|
+
(val) => {
|
33119
|
+
onChange(val);
|
33120
|
+
},
|
33121
|
+
50,
|
33122
|
+
{ leading: true }
|
33123
|
+
);
|
33123
33124
|
const onChangeLocal = (0, import_react31.useCallback)((val) => {
|
33124
33125
|
setLocalValue(val);
|
33126
|
+
onChangeDb(val);
|
33125
33127
|
}, []);
|
33126
33128
|
(0, import_react31.useEffect)(() => {
|
33127
33129
|
setLocalValue(value);
|