Preserve contacts popover editor contents when switching to search mode
This commit is contained in:
parent
e7af3f223a
commit
01e3173ed0
4 changed files with 41 additions and 10 deletions
|
@ -205,6 +205,11 @@ impl<D: PickerDelegate> Picker<D> {
|
|||
self.query_editor.read(cx).text(cx)
|
||||
}
|
||||
|
||||
pub fn set_query(&self, query: impl Into<Arc<str>>, cx: &mut ViewContext<Self>) {
|
||||
self.query_editor
|
||||
.update(cx, |editor, cx| editor.set_text(query, cx));
|
||||
}
|
||||
|
||||
fn on_query_editor_event(
|
||||
&mut self,
|
||||
_: ViewHandle<Editor>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue