Skip to content

Commit 7ede4db

Browse files
committed
fix(combobox): open-change invoked twice
1 parent 953476b commit 7ede4db

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/olive-dodos-decide.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@zag-js/combobox": patch
3+
---
4+
5+
Fix issue where `onOpenChange` with the same `open` value

packages/machines/combobox/src/combobox.machine.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,11 @@ export const machine = createMachine<ComboboxSchema>({
400400
{
401401
guard: "autoComplete",
402402
target: "suggesting",
403-
actions: ["setInputValue", "invokeOnOpen"],
403+
actions: ["setInputValue"],
404404
},
405405
{
406406
target: "suggesting",
407-
actions: ["clearHighlightedItem", "setInputValue", "invokeOnOpen"],
407+
actions: ["clearHighlightedItem", "setInputValue"],
408408
},
409409
],
410410
"ITEM.POINTER_MOVE": {

0 commit comments

Comments
 (0)