working selection in the admin panel for the admin perfectly well

This commit is contained in:
filipriec
2025-04-16 19:15:05 +02:00
parent 8ea9965ee3
commit 05d9e6e46b
3 changed files with 23 additions and 9 deletions

View File

@@ -99,10 +99,9 @@ pub fn handle_admin_navigation(
}
}
AdminFocus::Tables => {
// Currently, selecting a table just confirms the highlight.
// Future: Could be used for multi-select toggle or other actions.
if let Some(idx) = admin_state.table_list_state.selected() {
*command_message = format!("Table {} highlighted", idx);
if let Some(idx) = admin_state.get_selected_table_index() {
admin_state.toggle_table_selection(idx);
*command_message = format!("Toggled selection for table index {}", idx);
} else {
*command_message = "No table highlighted".to_string();
}