logic of the add button, needs redesign

This commit is contained in:
filipriec
2025-04-17 16:48:03 +02:00
parent ff8b4eb0f6
commit 4f39b93edd
3 changed files with 43 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ use crate::state::{
};
use crossterm::event::{KeyEvent};
use ratatui::widgets::TableState;
use crate::tui::functions::common::add_table::handle_add_column_action;
/// Handles navigation events specifically for the Add Table view.
/// Returns true if the event was handled, false otherwise.
@@ -150,8 +151,9 @@ pub fn handle_add_table_navigation(
Some("select") => {
match current_focus {
AddTableFocus::AddColumnButton => {
*command_message = "Action: Add Column (Not Implemented)".to_string();
// TODO: Implement logic
if let Some(focus_after_add) = handle_add_column_action(add_table_state, command_message) {
new_focus = focus_after_add;
}
}
AddTableFocus::SaveButton => {
*command_message = "Action: Save Table (Not Implemented)".to_string();