Skip to content

Commit

Permalink
Fix setting an initial value for the ComboBox (#921)
Browse files Browse the repository at this point in the history
Co-authored-by: christian.hausknecht <[email protected]>
(cherry picked from commit eaff40f)
  • Loading branch information
Lysander authored and christian.hausknecht committed Nov 18, 2024
1 parent f979eec commit 9a770f2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ class Combobox<E : HTMLElement, T>(tag: Tag<E>, id: String?) : Tag<E> by tag, Op
value(
merge(
internalState.selections.map { format(it) },
internalState.data.map { it.lastSelection }.distinctUntilChanged().flatMapLatest { value ->
internalState.data.drop(1).map { it.lastSelection }.distinctUntilChanged().flatMapLatest { value ->
internalState.resetQuery.transform {
// Before the input's value can be reset to the previous one we need to set it to
// the current typed value. This is needed because the underlying `mountSimple` function
Expand Down

0 comments on commit 9a770f2

Please sign in to comment.