From 08e01d41f2e6b288735f34a6c5524fe7fbfbf74a Mon Sep 17 00:00:00 2001 From: filipriec Date: Sat, 7 Jun 2025 09:37:12 +0200 Subject: [PATCH] now properly not displaying in the frontend form fields that should be hidden from the user --- client/src/ui/handlers/ui.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/src/ui/handlers/ui.rs b/client/src/ui/handlers/ui.rs index 5b206c8..73fac6d 100644 --- a/client/src/ui/handlers/ui.rs +++ b/client/src/ui/handlers/ui.rs @@ -320,7 +320,12 @@ pub async fn run_ui() -> Result<()> { match grpc_client.get_table_structure(prof_name.clone(), tbl_name.clone()).await { Ok(structure_response) => { let new_columns: Vec = structure_response.columns.iter().map(|c| c.name.clone()).collect(); - form_state = FormState::new(prof_name.clone(), tbl_name.clone(), new_columns); + + // --- START FIX --- + // Apply the same filtering logic here that is used on initial load. + let filtered_columns = filter_user_columns(new_columns); + form_state = FormState::new(prof_name.clone(), tbl_name.clone(), filtered_columns); + // --- END FIX --- if let Err(e) = UiService::fetch_and_set_table_count(&mut grpc_client, &mut form_state).await { app_state.update_dialog_content(&format!("Error fetching count: {}", e), vec!["OK".to_string()], DialogPurpose::LoginFailed);