pub struct SelectContentKeyState { /* private fields */ }Expand description
Open-state listbox policy for Radix-style select content.
This mirrors Radix outcomes inside SelectContent:
Escapecloses.Tabis suppressed (select should not be navigated using Tab).Home/End/ArrowUp/ArrowDownmove the active option (skipping disabled).Enter/Spacecommits the active option and closes.- Typeahead search moves the active option (with repeated-search normalization).
Implementations§
Source§impl SelectContentKeyState
impl SelectContentKeyState
pub fn active_row(&self) -> Option<usize>
pub fn set_active_row(&mut self, row: Option<usize>)
pub fn reset_on_open(&mut self, initial_active_row: Option<usize>)
pub fn clear_typeahead(&mut self, host: &mut dyn UiActionHost)
pub fn on_timer(&mut self, token: TimerToken) -> bool
pub fn handle_key_down_when_open( &mut self, host: &mut dyn UiActionHost, action_cx: ActionCx, open: &Model<bool>, value: &Model<Option<Arc<str>>>, values_by_row: &[Option<Arc<str>>], labels_by_row: &[Arc<str>], disabled_by_row: &[bool], on_value_change: Option<&Arc<dyn Fn(&mut dyn UiActionHost, ActionCx, Arc<str>) + 'static>>, key: KeyCode, repeat: bool, loop_navigation: bool, ) -> bool
Trait Implementations§
Source§impl Debug for SelectContentKeyState
impl Debug for SelectContentKeyState
Source§impl Default for SelectContentKeyState
impl Default for SelectContentKeyState
Source§fn default() -> SelectContentKeyState
fn default() -> SelectContentKeyState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SelectContentKeyState
impl RefUnwindSafe for SelectContentKeyState
impl Send for SelectContentKeyState
impl Sync for SelectContentKeyState
impl Unpin for SelectContentKeyState
impl UnsafeUnpin for SelectContentKeyState
impl UnwindSafe for SelectContentKeyState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more