refactor(SettingsTab): update Selector component usage for consistency

- Simplified Selector component usage in SettingsTab by removing deprecated props and updating to the new API.
- Added size and label props to enhance accessibility and user experience.
- Ensured consistent handling of selected keys and selection change events across multiple instances of Selector.
This commit is contained in:
MyPrototypeWhat
2025-09-19 12:10:28 +08:00
parent 84274d9d85
commit d4fd8ffdcc
2 changed files with 44 additions and 36 deletions
@@ -37,11 +37,7 @@ const Selector = <V extends string | number>({ items, onSelectionChange, ...rest
}
return (
<Select
{...rest}
label={<label className="hidden">Select</label>}
items={items}
onSelectionChange={handleSelectionChange}>
<Select {...rest} items={items} onSelectionChange={handleSelectionChange}>
{({ value, label, ...restItem }: SelectorItem<V>) => (
<SelectItem {...restItem} key={value} title={String(label)}>
{label}