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

Function remove_option

primitives/src/selection.rs:124–126  ·  view source on GitHub ↗

Remove a registered option by id.

(mut options: Signal<Vec<OptionState>>, id: &str)

Source from the content-addressed store, hash-verified

122
123/// Remove a registered option by id.
124pub(crate) fn remove_option(mut options: Signal<Vec<OptionState>>, id: &str) {
125 remove_option_state(&mut options.write(), id);
126}
127
128fn remove_option_state(options: &mut Vec<OptionState>, id: &str) {
129 options.retain(|option| option.id != id);

Callers 1

use_listbox_optionFunction · 0.85

Calls 1

remove_option_stateFunction · 0.85

Tested by

no test coverage detected