Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: delete table row #115

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/tui/tui_logic/request/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ impl App<'_> {
return;
}

let selection = self.body_form_table.selection.unwrap();
let selected_row = self.body_form_table.selection.unwrap();
let selected_request_index = &self.collections_tree.selected.unwrap();

if let Err(_) = self.delete_form_data(selection.0, selected_request_index.0, selected_request_index.1) {
if let Err(_) = self.delete_form_data(selected_request_index.0, selected_request_index.1, selected_row.0) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/tui/tui_logic/request/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ impl App<'_> {
return;
}

let selection = self.headers_table.selection.unwrap();
let selected_row = self.headers_table.selection.unwrap();
let selected_request_index = &self.collections_tree.selected.unwrap();

match self.delete_header(selection.0, selected_request_index.0, selected_request_index.1) {
match self.delete_header(selected_request_index.0, selected_request_index.1, selected_row.0) {
Ok(_) => {}
Err(_) => return
}
Expand Down
4 changes: 2 additions & 2 deletions src/tui/tui_logic/request/query_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ impl App<'_> {
return;
}

let selection = self.query_params_table.selection.unwrap();
let selected_row = self.query_params_table.selection.unwrap();
let selected_request_index = &self.collections_tree.selected.unwrap();

match self.delete_query_param(selection.0, selected_request_index.0, selected_request_index.1) {
match self.delete_query_param(selected_request_index.0, selected_request_index.1, selected_row.0) {
Ok(_) => {}
Err(_) => return
}
Expand Down