mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 00:57:26 +00:00
fw sync: resting-pointer popup trial names its list (upstream's PopupList::list)
Upstream routes an opener's list keys only to the list the popup names (PopupList::list / Overlay::list); the port found the first type-ahead stop in the layer. Upstream's mechanism wins; the trial's fixture names its list, its check stands.
This commit is contained in:
@@ -154,8 +154,10 @@ fn page(open: Rc<Cell<bool>>, activated: Rc<RefCell<Vec<usize>>>) -> Fixture {
|
||||
Button::new(format!("Page {at}")).show(ui);
|
||||
}
|
||||
let mut shown = open.get();
|
||||
PopupList::new("Rows", Bind::bound(&mut shown)).opened_by(&opener).show(ui, |ui, _| {
|
||||
let out = List::<usize>::options("Rows").show_items(ui, &Rows, &mut |at, _| ListRow::new(row(*at)).option());
|
||||
// The popup names its list, which takes the opener's list keys (`PopupList::list`).
|
||||
let list = opener.id.with("rows");
|
||||
PopupList::new("Rows", Bind::bound(&mut shown)).opened_by(&opener).list(list).show(ui, |ui, _| {
|
||||
let out = List::<usize>::options("Rows").id(list).show_items(ui, &Rows, &mut |at, _| ListRow::new(row(*at)).option());
|
||||
activated.borrow_mut().extend(out.events.iter().filter_map(|event| match event {
|
||||
CollectionEvent::Activate(at) => Some(*at),
|
||||
_ => None,
|
||||
|
||||
Reference in New Issue
Block a user