Merge pull request #30675 from backstage/fix-useid-react17

This commit is contained in:
Charles de Dreuille
2025-07-29 22:45:04 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/ui': patch
---
Updated Menu component in Backstage UI to use useId() from React Aria instead of React to support React 17.
+1 -1
View File
@@ -19,7 +19,6 @@ import {
useState,
useMemo,
useCallback,
useId,
ChangeEvent,
KeyboardEvent,
useRef,
@@ -28,6 +27,7 @@ import {
import clsx from 'clsx';
import { MenuComboboxOption, MenuComboboxProps } from './types';
import { Icon } from '../..';
import { useId } from 'react-aria';
const getListboxItemId = (listboxId: string, optionValue: string): string =>
`${listboxId}-option-${optionValue}`;