search added, but unable to trigger it yet
This commit is contained in:
@@ -6,6 +6,8 @@ use ratatui::layout::Rect;
|
||||
use ratatui::Frame;
|
||||
use crate::state::app::highlight::HighlightState;
|
||||
use crate::state::pages::canvas_state::CanvasState;
|
||||
use crate::state::app::state::AppState;
|
||||
use crate::components::common::search_palette::render_search_palette;
|
||||
|
||||
pub struct FormState {
|
||||
pub id: i64,
|
||||
@@ -54,6 +56,7 @@ impl FormState {
|
||||
theme: &Theme,
|
||||
is_edit_mode: bool,
|
||||
highlight_state: &HighlightState,
|
||||
app_state: &AppState,
|
||||
) {
|
||||
let fields_str_slice: Vec<&str> =
|
||||
self.fields.iter().map(|s| s.as_str()).collect();
|
||||
@@ -73,6 +76,12 @@ impl FormState {
|
||||
self.total_count,
|
||||
self.current_position,
|
||||
);
|
||||
|
||||
if app_state.ui.show_search_palette {
|
||||
if let Some(search_state) = &app_state.search_state {
|
||||
render_search_palette(f, f.size(), theme, search_state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Resets the form to a state for creating a new entry.
|
||||
|
||||
Reference in New Issue
Block a user