Skip to content

add combo_box::State::insert#3252

Open
edwloef wants to merge 1 commit intoiced-rs:masterfrom
edwloef:combo-box-state-insert
Open

add combo_box::State::insert#3252
edwloef wants to merge 1 commit intoiced-rs:masterfrom
edwloef:combo-box-state-insert

Conversation

@edwloef
Copy link
Contributor

@edwloef edwloef commented Feb 15, 2026

I have a bunch of entries for a combo box streaming into my app from the background. I'd like these options to be in sorted order in the combo box, however combo_box::State::into_options -> slice::partition_point -> Vec::insert -> combo_box::State::new loses the current search state, which can be disorienting when a new option arrives while searching. With this method present, I can use combo_box::State::options -> slice::partition_point -> combo_box::State::insert to maintain both sorted order and search state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant