MCPcopy Create free account
hub / github.com/bajrangCoder/setu / add_header

Method add_header

src/components/header_editor.rs:108–121  ·  view source on GitHub ↗

Add a new empty header row

(&mut self, window: &mut Window, cx: &mut Context<Self>)

Source from the content-addressed store, hash-verified

106 fn ensure_bulk_editor(&mut self, window: &mut Window, cx: &mut Context<Self>) {
107 if self.bulk_editor.is_none() {
108 let completion_engine = self.completion_engine.clone();
109 self.bulk_editor = Some(cx.new(|cx| {
110 configure_completion(
111 InputState::new(window, cx)
112 .code_editor(BULK_KV_LANGUAGE)
113 .line_number(true)
114 .searchable(true)
115 .soft_wrap(false)
116 .placeholder("Key: Value"),
117 completion_engine.as_ref(),
118 CompletionContext::HeaderValue,
119 )
120 }));
121 }
122 }
123
124 fn rows_as_bulk_entries(&self, cx: &App) -> Vec<BulkKvEntry> {

Callers 2

add_header_with_valueMethod · 0.45
renderMethod · 0.45

Calls 1

newMethod · 0.45

Tested by

no test coverage detected