diff --git a/.changeset/fe-887-use-property-init.md b/.changeset/fe-887-use-property-init.md deleted file mode 100644 index 3b31224..0000000 --- a/.changeset/fe-887-use-property-init.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"@pionjs/pion": patch ---- - -Fix: useProperty initialization sets default value even when preventDefault is called - -When a parent component uses `lift()` to listen to a property change event without -passing the property value to the child, `useProperty`'s initialization event was -`preventDefault`'d by `lift`, leaving the host property `undefined`. This caused crashes -in components like `cosmoz-omnitable` where `selectedItems` was never initialized. - -The `updater` method now accepts an `isInit` flag that bypasses the `preventDefault` veto -during initialization, ensuring the host always receives its default value. Subsequent -updates retain the full `lift`/`preventDefault` two-way binding semantics. \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6286ca0..07edd58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # pion +## 2.16.1 + +### Patch Changes + +- 7560f99: Fix: useProperty initialization sets default value even when preventDefault is called + + When a parent component uses `lift()` to listen to a property change event without + passing the property value to the child, `useProperty`'s initialization event was + `preventDefault`'d by `lift`, leaving the host property `undefined`. This caused crashes + in components like `cosmoz-omnitable` where `selectedItems` was never initialized. + + The `updater` method now accepts an `isInit` flag that bypasses the `preventDefault` veto + during initialization, ensuring the host always receives its default value. Subsequent + updates retain the full `lift`/`preventDefault` two-way binding semantics. + ## 2.16.0 ### Minor Changes diff --git a/package.json b/package.json index 5a2d607..7ef5a71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pionjs/pion", - "version": "2.16.0", + "version": "2.16.1", "description": "Hooks for web components", "main": "lib/haunted.js", "module": "lib/haunted.js",