Skip to content

Commit 8440215

Browse files
committed
Update EmployeeForm.jsx for handling Autocomplete component functionality
1 parent e85b73d commit 8440215

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

frontend/src/components/EmployeeForm.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const EmployeeForm = () => {
126126
<Autocomplete
127127
options={deptOptions}
128128
getOptionLabel={(option) => option.name || ''}
129+
getOptionKey={option => option.id}
129130
isOptionEqualToValue={(option, value) => option.id === value.id}
130131
onInputChange={(event, newInputValue) => {
131132
setQuery(newInputValue);

0 commit comments

Comments
 (0)