fix key error in Search

This commit is contained in:
Alex Holliday
2025-01-28 15:37:49 -08:00
parent b410c14d93
commit 067d457b96
@@ -139,7 +139,9 @@ const Search = ({
}
return filtered;
}}
getOptionKey={(option) => option.id}
getOptionKey={(option) => {
return option._id;
}}
renderOption={(props, option) => {
const { key, ...optionProps } = props;
return (
@@ -196,6 +198,7 @@ const Search = ({
};
Search.propTypes = {
label: PropTypes.string,
id: PropTypes.string,
multiple: PropTypes.bool,
options: PropTypes.array.isRequired,