We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4501522 commit 7e61aceCopy full SHA for 7e61ace
website/src/components/SearchPage/fields/MutationField.tsx
@@ -168,10 +168,14 @@ export const MutationField: FC<MutationFieldProps> = ({ referenceGenomesSequence
168
setOptions(newOptions);
169
};
170
171
- const handleOptionClick = (option: MutationQuery[] | MutationQuery) => {
+ const handleOptionClick = (option: MutationQuery[] | MutationQuery | null) => {
172
if (Array.isArray(option)) {
173
option = option[0];
174
}
175
+ // Unclear how to handle null here, necessary since headlessui v2
176
+ if (!option) {
177
+ return;
178
+ }
179
const newSelectedOptions = [...selectedOptions, option];
180
onChange(serializeMutationQueries(newSelectedOptions));
181
setInputValue('');
0 commit comments