Skip to content

Commit

Permalink
fix: allow overriding the combobox input id (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte authored May 26, 2024
1 parent 531a040 commit 32af944
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-cameras-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": patch
---

fix: allow overriding the combobox input id
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@
export let asChild: $$Props["asChild"] = false;
export let placeholder: $$Props["placeholder"] = undefined;
export let el: $$Props["el"] = undefined;
export let id: $$Props["id"] = undefined;
const {
elements: { input },
ids,
getAttrs,
} = getCtx();
const dispatch = createDispatcher();
const attrs = getAttrs("input");
$: if (id) {
ids.trigger.set(id);
}
$: builder = $input;
$: Object.assign(builder, attrs);
</script>
Expand Down

0 comments on commit 32af944

Please sign in to comment.