scrolling in the add table doesnt highlight first item anymore

This commit is contained in:
filipriec
2025-04-18 09:27:28 +02:00
parent 4db78ecf1b
commit f50fe788cb

View File

@@ -262,22 +262,6 @@ pub fn handle_add_table_navigation(
);
// Focus is outside canvas if it's not an input field
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 {
// command_message.clear(); // Optional: Clear message if not handled here
}