diff --git a/widget/src/combo_box.rs b/widget/src/combo_box.rs index dd87c5a171..39fb5dfcab 100644 --- a/widget/src/combo_box.rs +++ b/widget/src/combo_box.rs @@ -862,14 +862,18 @@ where menu, &filtered_options.options, hovered_option, - |x| { + |selection| { + self.state.with_inner_mut(|state| { + state.value = String::new(); + state.filtered_options.update(self.state.options.clone()); + }); + tree.children[0] - .state - .downcast_mut::>( - ) - .unfocus(); + .state + .downcast_mut::>() + .unfocus(); - (self.on_selected)(x) + (self.on_selected)(selection) }, self.on_option_hovered.as_deref(), &self.menu_class,