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

Method selected

primitives/src/collection.rs:517–520  ·  view source on GitHub ↗

Whether this item is the selected one. When nothing is focused yet, the selected item becomes the roving tab stop — mirrors React Aria seeding `focusedKey` from `firstSelectedKey`.

(mut self, selected: impl Fn() -> bool + 'static)

Source from the content-addressed store, hash-verified

515 /// selected item becomes the roving tab stop — mirrors React Aria seeding
516 /// `focusedKey` from `firstSelectedKey`.
517 pub(crate) fn selected(mut self, selected: impl Fn() -> bool + 'static) -> Self {
518 self.selected = Rc::new(selected);
519 self
520 }
521}
522
523/// Register an item builder and return its handle: a roving `tabindex`,

Callers 4

RadioItemFunction · 0.80
TabTriggerFunction · 0.80
ComboboxOptionFunction · 0.80
SelectOptionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected