scrolling in the add table doesnt highlight first item anymore
This commit is contained in:
@@ -262,22 +262,6 @@ pub fn handle_add_table_navigation(
|
|||||||
);
|
);
|
||||||
// Focus is outside canvas if it's not an input field
|
// Focus is outside canvas if it's not an input field
|
||||||
app_state.ui.focus_outside_canvas = !new_is_canvas_input_focus;
|
app_state.ui.focus_outside_canvas = !new_is_canvas_input_focus;
|
||||||
|
|
||||||
|
|
||||||
// Select first item when focusing a table block (but not when entering 'Inside')
|
|
||||||
// This might be redundant now due to the 'select' logic selecting first item on entry.
|
|
||||||
// Consider removing this block if it causes issues.
|
|
||||||
match add_table_state.current_focus {
|
|
||||||
AddTableFocus::ColumnsTable if add_table_state.column_table_state.selected().is_none() && !add_table_state.columns.is_empty() => {
|
|
||||||
add_table_state.column_table_state.select(Some(0));
|
|
||||||
}
|
|
||||||
AddTableFocus::IndexesTable if add_table_state.index_table_state.selected().is_none() && !add_table_state.indexes.is_empty() => {
|
|
||||||
add_table_state.index_table_state.select(Some(0));
|
|
||||||
}
|
|
||||||
AddTableFocus::LinksTable if add_table_state.link_table_state.selected().is_none() && !add_table_state.links.is_empty() => {
|
|
||||||
add_table_state.link_table_state.select(Some(0));
|
|
||||||
}_ => {}
|
|
||||||
}
|
|
||||||
} else if !handled {
|
} else if !handled {
|
||||||
// command_message.clear(); // Optional: Clear message if not handled here
|
// command_message.clear(); // Optional: Clear message if not handled here
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user