Browse Source

chore: Update react-aria dependencies

Ryan Albrecht 7 months ago
parent
commit
9b4fa2fce9

+ 2 - 1
static/app/components/comboBox/index.tsx

@@ -5,6 +5,7 @@ import styled from '@emotion/styled';
 import {useComboBox} from '@react-aria/combobox';
 import {Item, Section} from '@react-stately/collections';
 import {type ComboBoxStateOptions, useComboBoxState} from '@react-stately/combobox';
+import type {Key} from '@react-types/shared';
 import omit from 'lodash/omit';
 
 import type {SelectOption} from 'sentry/components/compactSelect';
@@ -278,7 +279,7 @@ function ControlledComboBox<Value extends string>({
   valueRef.current = value;
 
   const handleChange = useCallback(
-    (key: string | number) => {
+    (key: Key | null) => {
       // Prevent calling onChange on closing the menu without selecting a different value
       if (getEscapedKey(valueRef.current) === key) {
         return;

+ 2 - 2
static/app/components/searchQueryBuilder/tokens/combobox.tsx

@@ -502,8 +502,8 @@ function SearchQueryBuilderComboboxInner<T extends SelectOptionOrSectionWithKey<
   });
 
   const onSelectionChange = useCallback(
-    (key: Key) => {
-      const selectedOption = findItemInSections(items, key);
+    (key: Key | null) => {
+      const selectedOption = key ? findItemInSections(items, key) : null;
       if (selectedOption && 'textValue' in selectedOption && selectedOption.textValue) {
         onOptionSelected(selectedOption.textValue);
       } else if (key) {

File diff suppressed because it is too large
+ 479 - 487
yarn.lock


Some files were not shown because too many files changed in this diff