@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.
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",
3
+ "version": "0.11.3-canary.ab9d43f",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",