(
&mut self,
collection_id: Uuid,
node_id: Uuid,
cx: &mut Context<Self>,
)
| 535 | } |
| 536 | |
| 537 | /// Ensure sidebar search inputs are initialized |
| 538 | fn ensure_sidebar_inputs(&mut self, window: &mut Window, cx: &mut Context<Self>) { |
| 539 | if self.history_search.is_none() { |
| 540 | let input = cx.new(|cx| InputState::new(window, cx).placeholder("Search history...")); |
| 541 | cx.subscribe_in(&input, window, |this, _, event, _, cx| { |
| 542 | if matches!(event, gpui_component::input::InputEvent::Change) { |
| 543 | this.schedule_history_rows(cx); |
| 544 | cx.notify(); |
| 545 | } |
| 546 | }) |
| 547 | .detach(); |
| 548 | self.history_search = Some(input); |
| 549 | } |
no test coverage detected