Skip to content

Commit

Permalink
Merge branch 'main' into redesign-docs-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Dec 1, 2023
2 parents 8349969 + bbf7e4a commit 4f901c5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @huntabyte/primitives

## 0.9.9

### Patch Changes

- fix: bug where menu `onChange` functions were being called before change ([#191](https://github.com/huntabyte/bits-ui/pull/191))

## 0.9.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bits-ui",
"version": "0.9.8",
"version": "0.9.9",
"license": "MIT",
"repository": "github:huntabyte/bits-ui",
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions src/lib/bits/menu/components/menu-checkbox-item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
disabled,
defaultChecked: checked,
onCheckedChange: ({ next }) => {
onCheckedChange?.(next);
checked = next;
if (checked !== next) {
onCheckedChange?.(next);
checked = next;
}
return next;
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bits/menu/components/menu-radio-group.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
} = setRadioGroupCtx({
defaultValue: value,
onValueChange: ({ next }) => {
if (next) {
if (next && next !== value) {
onValueChange?.(next);
value = next;
}
Expand Down

0 comments on commit 4f901c5

Please sign in to comment.