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

Method focus_first_where

primitives/src/selectable.rs:159–162  ·  view source on GitHub ↗
(&mut self, predicate: impl Fn(&OptionState) -> bool)

Source from the content-addressed store, hash-verified

157 }
158
159 pub(crate) fn focus_first_where(&mut self, predicate: impl Fn(&OptionState) -> bool) {
160 let index = self.first_matching_enabled_index(predicate);
161 self.collection.set_focus(index);
162 }
163
164 pub(crate) fn focus_last_where(&mut self, predicate: impl Fn(&OptionState) -> bool) {
165 let index = self.last_matching_enabled_index(predicate);

Callers 1

focus_first_visibleMethod · 0.80

Calls 2

set_focusMethod · 0.45

Tested by

no test coverage detected