diff --git a/packages/smarthr-ui/src/components/ComboBox/ListBoxItemButton.tsx b/packages/smarthr-ui/src/components/ComboBox/ListBoxItemButton.tsx index d6da4d659c..da71c64d99 100644 --- a/packages/smarthr-ui/src/components/ComboBox/ListBoxItemButton.tsx +++ b/packages/smarthr-ui/src/components/ComboBox/ListBoxItemButton.tsx @@ -66,7 +66,7 @@ const ListBoxItemButton = ({ ) const commonAttrs = { - type: 'button', + type: 'button' as const, role: 'option', id: option.id, key: option.id, diff --git a/packages/smarthr-ui/src/components/ComboBox/SingleComboBox/SingleComboBox.tsx b/packages/smarthr-ui/src/components/ComboBox/SingleComboBox/SingleComboBox.tsx index 5304b4447d..b97b30b792 100644 --- a/packages/smarthr-ui/src/components/ComboBox/SingleComboBox/SingleComboBox.tsx +++ b/packages/smarthr-ui/src/components/ComboBox/SingleComboBox/SingleComboBox.tsx @@ -62,10 +62,11 @@ type Props = BaseProps & { * コンポーネントからフォーカスが外れた時に発火するコールバック関数 */ onBlur?: () => void + // HINT: useListBox内でnoResultText, loadingTextは実行される /** * コンポーネント内のテキストを変更する関数/ */ - decorators?: DecoratorsType + decorators?: DecoratorsType } type ElementProps = Omit, keyof Props> @@ -323,6 +324,7 @@ const ActualSingleComboBox = ( const handleKeyPress = useCallback( (e: React.KeyboardEvent) => { if (e.key === 'Enter') e.preventDefault() + onKeyPress?.(e) }, [onKeyPress], @@ -404,8 +406,8 @@ const ActualSingleComboBox = ( className={styles.clearButtonIcon} /> - {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions, smarthr/a11y-delegate-element-has-role-presentation */} - + {/* eslint-disable-next-line smarthr/a11y-delegate-element-has-role-presentation */} +