A select over options with selected chosen, the menu open or not. on_toggle is what pressing the button sends (the app flips open), on_pick what choosing an option sends (the app stores it and closes), on_dismiss a press outside or Escape (the app closes). The number of options stays the same for as long as it is shown.
Signature
pub const fn select<'a, M>( options: &'a [&'a str], selected: Option<usize>, open: bool, on_toggle: M, on_pick: fn(usize) -> M, on_dismiss: M, ) -> Select<'a, M>Methods
.placeholder(text: &'a str) -> Self— What the button says while nothing is chosen.
Example
use fusuma::select;
let view = select(&["Small", "Medium", "Large"], Some(1), false, 0, |i| i + 10, 0).placeholder("Size");
let built = fusuma::doc::built::<usize, _>(&view);
assert!(built.nodes() > 1);