we compiled
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
use crate::state::pages::form::FormState;
|
||||
use crate::services::grpc_client::GrpcClient;
|
||||
use crate::state::pages::canvas_state::CanvasState;
|
||||
use anyhow::{anyhow, Result};
|
||||
|
||||
pub async fn handle_action(
|
||||
action: &str,
|
||||
@@ -10,7 +11,7 @@ pub async fn handle_action(
|
||||
current_position: &mut u64,
|
||||
total_count: u64,
|
||||
ideal_cursor_column: &mut usize,
|
||||
) -> Result<String, Box<dyn std::error::Error>> {
|
||||
) -> Result<String> {
|
||||
// TODO store unsaved changes without deleting form state values
|
||||
// First check for unsaved changes in both cases
|
||||
if form_state.has_unsaved_changes() {
|
||||
@@ -84,6 +85,7 @@ pub async fn handle_action(
|
||||
Ok("Already at last entry".into())
|
||||
}
|
||||
}
|
||||
_ => Err("Unknown form action".into())
|
||||
_ => Err(anyhow!("Unknown form action: {}", action))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user