fix(ui): sort active item
This commit is contained in:
parent
2c7fc9b88e
commit
7f28f87f5c
1 changed files with 2 additions and 8 deletions
|
|
@ -12,7 +12,6 @@ const sortOptionsMap = {
|
|||
};
|
||||
|
||||
const sortOptions = Object.entries(sortOptionsMap).map(([value, label]) => ({
|
||||
// value,
|
||||
label,
|
||||
key: value
|
||||
}));
|
||||
|
|
@ -27,16 +26,11 @@ export function SortDropdown<T>({ defaultOption, onSort, sortOptions, current }:
|
|||
<Dropdown
|
||||
menu={{
|
||||
items: sortOptions,
|
||||
defaultSelectedKeys: defaultOption ? [defaultOption] : undefined,
|
||||
// @ts-ignore
|
||||
selectedKeys: [defaultOption],
|
||||
onClick: onSort
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className={
|
||||
'cursor-pointer flex items-center justify-end gap-2'
|
||||
}
|
||||
>
|
||||
<div className={'cursor-pointer flex items-center justify-end gap-2'}>
|
||||
<div>{current}</div>
|
||||
<DownOutlined />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue