mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 12:20:16 +01:00
Add database lineNumber field type (#11008)
* 🎨 add database lineNumber type * 🎨 fix https://github.com/siyuan-note/siyuan/issues/10896 * 🎨 Improve mobile app appearance language https://github.com/siyuan-note/siyuan/issues/11009 * 🎨 Improve database template field calc https://github.com/siyuan-note/siyuan/issues/11011 * ⬆️ Upgrade kernel deps * ⬆️ Upgrade kernel deps * 🎨 fix https://github.com/siyuan-note/siyuan/issues/10896 * 🎨 fix https://github.com/siyuan-note/siyuan/issues/10896 * 🐛 https://github.com/siyuan-note/siyuan/issues/11015 * 🐛 https://github.com/siyuan-note/siyuan/issues/11018 * 🐛 https://github.com/siyuan-note/siyuan/issues/11018 * 🎨 刚创建时无 id,更新需和 oldValue 保持一致 * 🐛 Database date field between filter calculation error Fix https://github.com/siyuan-note/siyuan/issues/10979 * 🐛 Primary key value unexpectedly updated when database adds row https://github.com/siyuan-note/siyuan/issues/11018 * 🎨 https://github.com/siyuan-note/siyuan/issues/11013 * 🎨 搜索可汇总字段时排除行号类型字段 https://github.com/siyuan-note/siyuan/pull/11008 * 🎨 lineNumber no need to join the calc op and remove useless todo tag --------- Co-authored-by: Vanessa <lly219@gmail.com> Co-authored-by: Daniel <845765@qq.com>
This commit is contained in:
parent
afeea6a80e
commit
8a354da50a
16 changed files with 224 additions and 108 deletions
|
|
@ -16,12 +16,19 @@ export const addSort = (options: {
|
|||
const menu = new Menu("av-add-sort");
|
||||
options.data.view.columns.forEach((column) => {
|
||||
let hasSort = false;
|
||||
options.data.view.sorts.find((sort) => {
|
||||
if (sort.column === column.id) {
|
||||
hasSort = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// 如果该列是行号类型列,不允许添加排序
|
||||
if (column.type === "lineNumber") {
|
||||
hasSort = true;
|
||||
} else {
|
||||
options.data.view.sorts.find((sort) => {
|
||||
if (sort.column === column.id) {
|
||||
hasSort = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!hasSort) {
|
||||
menu.addItem({
|
||||
label: column.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue