diff --git a/packages/libs/react-ui/src/components/Select/Select.stories.tsx b/packages/libs/react-ui/src/components/Select/Select.stories.tsx index b20f5b83f4..52a84c07e5 100644 --- a/packages/libs/react-ui/src/components/Select/Select.stories.tsx +++ b/packages/libs/react-ui/src/components/Select/Select.stories.tsx @@ -46,6 +46,7 @@ export const Dynamic: Story = { const [value, setValue] = useState('1'); return ( {}}> + , @@ -18,7 +18,7 @@ describe('Select', () => { it('renders the provided children options', () => { const { getByTestId } = render( - {}} ariaLabel="select"> , @@ -37,7 +37,7 @@ describe('Select', () => { it('invokes the onChange event handler when an option is selected', () => { const handleChange = jest.fn(); const { getByTestId } = render( - , @@ -54,7 +54,7 @@ describe('Select', () => { it('disables the select element when disabled prop is true', () => { const { getByTestId } = render( - {}} disabled ariaLabel="select"> , @@ -71,7 +71,7 @@ describe('Select', () => { it('renders an icon when the "icon" prop is provided', () => { const IconMock = jest.fn(() => User); const { getByTestId, getByText } = render( - {}} icon={IconMock} ariaLabel="select"> , diff --git a/packages/libs/react-ui/src/components/Select/Select.tsx b/packages/libs/react-ui/src/components/Select/Select.tsx index 41d1e92c1b..0b34226cf3 100644 --- a/packages/libs/react-ui/src/components/Select/Select.tsx +++ b/packages/libs/react-ui/src/components/Select/Select.tsx @@ -12,13 +12,17 @@ import classNames from 'classnames'; import React, { FC, forwardRef } from 'react'; export interface ISelectProps - extends Omit, 'as' | 'className'> { + extends Omit< + React.HTMLAttributes, + 'aria-label' | 'as' | 'className' + > { children: React.ReactNode; icon?: (typeof SystemIcon)[keyof typeof SystemIcon]; disabled?: boolean; value: string[] | string | number; onChange: React.ChangeEventHandler; ref?: React.ForwardedRef; + ariaLabel: string; } export const Select: FC = forwardRef< @@ -30,6 +34,7 @@ export const Select: FC = forwardRef< icon: Icon, disabled = false, children, + ariaLabel, ...rest }, ref, @@ -49,6 +54,7 @@ export const Select: FC = forwardRef< )}