new canvas library changed client for compatibility
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// src/state/pages/add_table.rs
|
||||
use canvas::canvas::{CanvasState, ActionContext, CanvasAction}; // External library
|
||||
use canvas::canvas::{CanvasState, ActionContext, CanvasAction, AppMode};
|
||||
use ratatui::widgets::TableState;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -63,6 +63,7 @@ pub struct AddTableState {
|
||||
pub column_name_cursor_pos: usize,
|
||||
pub column_type_cursor_pos: usize,
|
||||
pub has_unsaved_changes: bool,
|
||||
pub app_mode: AppMode,
|
||||
}
|
||||
|
||||
impl Default for AddTableState {
|
||||
@@ -85,6 +86,7 @@ impl Default for AddTableState {
|
||||
column_name_cursor_pos: 0,
|
||||
column_type_cursor_pos: 0,
|
||||
has_unsaved_changes: false,
|
||||
app_mode: AppMode::Edit,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -297,4 +299,8 @@ impl CanvasState for AddTableState {
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_mode(&self) -> AppMode {
|
||||
self.app_mode
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user