@measured/puck 0.11.2-canary.6edef2c → 0.11.3-canary.487ab83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/index.js +8 -6
  2. 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 [localValueDb] = (0, import_use_debounce2.useDebounce)(localValue, 50, { leading: true });
33118
- (0, import_react31.useEffect)(() => {
33119
- if (value !== localValueDb) {
33120
- onChange(localValueDb);
33121
- }
33122
- }, [localValueDb]);
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.11.2-canary.6edef2c",
3
+ "version": "0.11.3-canary.487ab83",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",