@@ -23,6 +23,7 @@ import { ReimbursementProductCreateArgs, validateWBS, wbsPipe } from 'shared';
2323import { Add , Delete } from '@mui/icons-material' ;
2424import { Control , Controller , FieldErrors , UseFormSetValue } from 'react-hook-form' ;
2525import { ReimbursementRequestFormInput } from './ReimbursementRequestForm' ;
26+ import React , { useState } from 'react' ;
2627
2728interface ReimbursementProductTableProps {
2829 reimbursementProducts : ReimbursementProductCreateArgs [ ] ;
@@ -72,6 +73,8 @@ const ReimbursementProductTable: React.FC<ReimbursementProductTableProps> = ({
7273 setValue ( `reimbursementProducts.${ index } .cost` , parseFloat ( value . toFixed ( 2 ) ) ) ;
7374 } ;
7475
76+ const [ inputValue , setInputValue ] = useState ( '' ) ;
77+
7578 return (
7679 < TableContainer >
7780 < Table >
@@ -163,8 +166,12 @@ const ReimbursementProductTable: React.FC<ReimbursementProductTableProps> = ({
163166 sx = { { my : 1 } }
164167 options = { wbsElementAutocompleteOptions }
165168 onChange = { ( _event , value ) => {
166- if ( value ) appendProduct ( { wbsNum : validateWBS ( value . id ) , name : '' , cost : 0 } ) ;
169+ if ( value ) {
170+ appendProduct ( { wbsNum : validateWBS ( value . id ) , name : '' , cost : 0 } ) ;
171+ }
167172 } }
173+ value = { null }
174+ blurOnSelect = { true }
168175 id = { 'append-product-autocomplete' }
169176 size = { 'small' }
170177 renderInput = { ( params ) => < TextField { ...params } placeholder = "Select a Project" /> }
0 commit comments