diff --git a/crates/ui/src/list/list.rs b/crates/ui/src/list/list.rs index be0fe0de..32d00c91 100644 --- a/crates/ui/src/list/list.rs +++ b/crates/ui/src/list/list.rs @@ -199,10 +199,15 @@ where self._search_task = cx.spawn(|this, mut cx| async move { search.await; + + let _ = this.update(&mut cx, |this, _| { + this.vertical_scroll_handle.scroll_to_item(0); + this.last_query = Some(text); + }); + // Always wait 100ms to avoid flicker Timer::after(Duration::from_millis(100)).await; let _ = this.update(&mut cx, |this, cx| { - this.last_query = Some(text); this.set_loading(false, cx); }); });