Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
calebporzio committed Jan 21, 2024
1 parent c2e56bc commit 88be3ec
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/ui/src/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,13 @@ function handleRoot(el, Alpine) {
// to settle up currently selected Values (this prevents this next bit
// of code from running multiple times on startup...)
queueMicrotask(() => {
// Set initial combobox values in the input...
queueMicrotask(() => this.__resetInput())

Alpine.effect(() => {
// Everytime the value changes, we need to re-render the hidden inputs,
// if a user passed the "name" prop...
this.__inputName && renderHiddenInputs(Alpine, this.$el, this.__inputName, this.__value)
})

// Set initial combobox values in the input and properly clear it when the value is reset programmatically...
Alpine.effect(() => ! this.__isMultiple && this.__resetInput())
})
},
Expand Down

0 comments on commit 88be3ec

Please sign in to comment.