MCPcopy Create free account
hub / github.com/DioxusLabs/dioxus-components / insert_option

Function insert_option

primitives/src/selection.rs:118–121  ·  view source on GitHub ↗
(options: &mut Vec<OptionState>, option_state: OptionState)

Source from the content-addressed store, hash-verified

116}
117
118fn insert_option(options: &mut Vec<OptionState>, option_state: OptionState) {
119 let insert_at = options.partition_point(|option| option.index <= option_state.index);
120 options.insert(insert_at, option_state);
121}
122
123/// Remove a registered option by id.
124pub(crate) fn remove_option(mut options: Signal<Vec<OptionState>>, id: &str) {

Callers 1

sync_option_stateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected