mirror of
https://github.com/usememos/memos.git
synced 2024-11-11 01:12:40 +08:00
fix: sort tags in creating shortcut (#69)
This commit is contained in:
parent
7b6be96eb3
commit
5d6df87af0
1 changed files with 4 additions and 6 deletions
|
@ -152,6 +152,7 @@ interface MemoFilterInputerProps {
|
|||
|
||||
const FilterInputer: React.FC<MemoFilterInputerProps> = (props: MemoFilterInputerProps) => {
|
||||
const { index, filter, handleFilterChange, handleFilterRemove } = props;
|
||||
const tags = Array.from(memoService.getState().tags);
|
||||
const { type } = filter;
|
||||
const [inputElements, setInputElements] = useState<JSX.Element>(<></>);
|
||||
|
||||
|
@ -185,12 +186,9 @@ const FilterInputer: React.FC<MemoFilterInputerProps> = (props: MemoFilterInpute
|
|||
valueElement = (
|
||||
<Selector
|
||||
className="value-selector"
|
||||
dataSource={memoService
|
||||
.getState()
|
||||
.tags.sort()
|
||||
.map((t) => {
|
||||
return { text: t, value: t };
|
||||
})}
|
||||
dataSource={tags.sort().map((t) => {
|
||||
return { text: t, value: t };
|
||||
})}
|
||||
value={filter.value.value}
|
||||
handleValueChanged={handleValueChange}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue