select: Avoid reopen menu when clearing selection (#1484)

This commit is contained in:
Floyd Wang 2025-11-03 16:24:54 +08:00 committed by GitHub
parent 9fa2669ff4
commit 3d606a6909
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -682,6 +682,7 @@ where
}
fn clean(&mut self, _: &ClickEvent, window: &mut Window, cx: &mut Context<Self>) {
cx.stop_propagation();
self.set_selected_index(None, window, cx);
cx.emit(SelectEvent::Confirm(None));
}