diff options
| author | kunish <[email protected]> | 2023-02-28 15:49:53 +0800 |
|---|---|---|
| committer | kunish <[email protected]> | 2023-02-28 15:49:53 +0800 |
| commit | 2a421573de1cd0f518f64de7204d8929a96c8124 (patch) | |
| tree | 146f69d48c7fe55b5eea4ce72314ca8fce3f911b /src/components/shared/Select.tsx | |
| parent | ba46bae1df09e3c9f7fd4b39a007176caca8498a (diff) | |
fix: i18n not following system language setting
Diffstat (limited to 'src/components/shared/Select.tsx')
| -rw-r--r-- | src/components/shared/Select.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/shared/Select.tsx b/src/components/shared/Select.tsx index de409cb..8d00f43 100644 --- a/src/components/shared/Select.tsx +++ b/src/components/shared/Select.tsx @@ -5,13 +5,12 @@ import s from './Select.module.scss'; type Props = { options: Array<string[]>; selected: string; - onChange: (event: React.ChangeEvent<HTMLSelectElement>) => any; -}; +} & React.SelectHTMLAttributes<HTMLSelectElement>; -export default function Select({ options, selected, onChange }: Props) { +export default function Select({ options, selected, onChange, ...props }: Props) { return ( // eslint-disable-next-line jsx-a11y/no-onchange - <select className={s.select} value={selected} onChange={onChange}> + <select className={s.select} value={selected} onChange={onChange} {...props}> {options.map(([value, name]) => ( <option key={value} value={value}> {name} |
