mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-07 21:47:02 +09:00
make default empty values sorted on bottom
This commit is contained in:
parent
26a6f95540
commit
b2a7ec7baf
2 changed files with 7 additions and 4 deletions
|
@ -368,7 +368,10 @@ const Controls = observer(class Controls extends React.Component<Props> {
|
|||
};
|
||||
|
||||
if (component == 'dataviewSort') {
|
||||
newItem.type = I.SortType.Asc;
|
||||
newItem = Object.assign(newItem, {
|
||||
type: I.SortType.Asc,
|
||||
empty: I.EmptyType.End,
|
||||
});
|
||||
|
||||
onSortAdd(newItem, callBack);
|
||||
} else
|
||||
|
|
|
@ -305,7 +305,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> {
|
|||
rootId,
|
||||
blockId,
|
||||
getView,
|
||||
onSelect: (v) => {
|
||||
onSelect: v => {
|
||||
this.onChange(item.id, 'relationKey', v.relationKey ? v.relationKey : v.id);
|
||||
}
|
||||
});
|
||||
|
@ -326,11 +326,11 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> {
|
|||
return;
|
||||
};
|
||||
|
||||
const obj = $(`#${getId()}`);
|
||||
const content = obj.find('.content');
|
||||
const content = $(`#${getId()} .content`);
|
||||
const newItem = {
|
||||
relationKey: relationOptions[0].id,
|
||||
type: I.SortType.Asc,
|
||||
empty: I.EmptyType.End,
|
||||
};
|
||||
|
||||
onSortAdd(newItem, () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue