@measured/puck 0.12.0-canary.ac59e51 → 0.12.0-canary.afd6a9d
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
@@ -33102,14 +33102,16 @@ var InputOrGroup = (_a) => {
|
|
33102
33102
|
var _b = _a, { onChange } = _b, props = __objRest(_b, ["onChange"]);
|
33103
33103
|
const { name, field, value, readOnly } = props;
|
33104
33104
|
const [localValue, setLocalValue] = (0, import_react30.useState)(value);
|
33105
|
-
const
|
33106
|
-
|
33107
|
-
|
33108
|
-
|
33109
|
-
|
33110
|
-
|
33105
|
+
const onChangeDb = (0, import_use_debounce2.useDebouncedCallback)(
|
33106
|
+
(val) => {
|
33107
|
+
onChange(val);
|
33108
|
+
},
|
33109
|
+
50,
|
33110
|
+
{ leading: true }
|
33111
|
+
);
|
33111
33112
|
const onChangeLocal = (0, import_react30.useCallback)((val) => {
|
33112
33113
|
setLocalValue(val);
|
33114
|
+
onChangeDb(val);
|
33113
33115
|
}, []);
|
33114
33116
|
(0, import_react30.useEffect)(() => {
|
33115
33117
|
setLocalValue(value);
|