Skip to content

Commit

Permalink
Merge pull request #2148 from mazzi/fix_disable_node_selection
Browse files Browse the repository at this point in the history
fix(launchpad): disable node selection
  • Loading branch information
RolandSherwin authored Sep 27, 2024
2 parents 9802dfc + 959b824 commit 93e2ee4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions node-launchpad/src/components/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ impl Status {
);

if !self.node_services.is_empty() && self.node_table_state.selected().is_none() {
self.node_table_state.select(Some(0));
// self.node_table_state.select(Some(0));
self.node_table_state.select(None);
}

Ok(())
Expand All @@ -207,7 +208,7 @@ impl Status {
.collect()
}

fn select_next_table_item(&mut self) {
fn _select_next_table_item(&mut self) {
let i = match self.node_table_state.selected() {
Some(i) => {
if i >= self.node_services.len() - 1 {
Expand All @@ -221,7 +222,7 @@ impl Status {
self.node_table_state.select(Some(i));
}

fn select_previous_table_item(&mut self) {
fn _select_previous_table_item(&mut self) {
let i = match self.node_table_state.selected() {
Some(i) => {
if i == 0 {
Expand Down Expand Up @@ -411,10 +412,10 @@ impl Component for Status {
return Ok(Some(Action::SwitchScene(Scene::ManageNodesPopUp)));
}
StatusActions::PreviousTableItem => {
self.select_previous_table_item();
// self.select_previous_table_item();
}
StatusActions::NextTableItem => {
self.select_next_table_item();
// self.select_next_table_item();
}
StatusActions::StartNodes => {
debug!("Got action to start nodes");
Expand Down

0 comments on commit 93e2ee4

Please sign in to comment.