@measured/puck 0.11.2 → 0.11.3-canary.ab9d43f
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.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);
|