Skip to content

Commit

Permalink
fix: Select and Combobox infinite loop on item select
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Nov 14, 2024
1 parent b00ddf9 commit a46e35e
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 67 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-pumas-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": patch
---

fix: `Select` and `Combobox` infinite loop on item selection
2 changes: 1 addition & 1 deletion packages/bits-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"jest-axe": "^9.0.0",
"jsdom": "^24.1.0",
"publint": "^0.2.11",
"svelte": "^5.1.0",
"svelte": "^5.1.16",
"svelte-check": "4.0.3",
"tslib": "^2.7.0",
"typescript": "^5.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/bits-ui/src/lib/bits/select/select.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ class SelectItemState {

$effect(() => {
if (!this.mounted) return;
this.root.setInitialHighlightedNode();
untrack(() => this.root.setInitialHighlightedNode());
});
}

Expand Down
Loading

0 comments on commit a46e35e

Please sign in to comment.