From 2645d970ed579cea02e2607a83335f4d3656c703 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Wed, 20 May 2026 17:24:14 -0400 Subject: [PATCH] Fix customer name not binding from Autocomplete free text input The freeSolo Autocomplete only updated customerName on dropdown selection, not on typed input. Update form state on onInputChange so validation passes when typing a new customer name. --- web/src/pages/proposals/form/ProposalFormPage.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/pages/proposals/form/ProposalFormPage.tsx b/web/src/pages/proposals/form/ProposalFormPage.tsx index a18f5e1..5e8a3d5 100644 --- a/web/src/pages/proposals/form/ProposalFormPage.tsx +++ b/web/src/pages/proposals/form/ProposalFormPage.tsx @@ -130,7 +130,12 @@ export default function ProposalFormPage() { options={customers} getOptionLabel={(opt) => (typeof opt === 'string' ? opt : opt.name)} loading={customerLoading} - onInputChange={(_, value) => searchCustomers(value)} + onInputChange={(_, value, reason) => { + if (reason === 'input') { + handleChange('customerName', value); + } + searchCustomers(value); + }} onChange={handleCustomerSelect} renderInput={(params) => (