mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +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
|
|
@ -854,6 +854,46 @@ export const openMenuPanel = (options: {
|
|||
name,
|
||||
type: target.dataset.oldType as TAVCol,
|
||||
}]);
|
||||
|
||||
// 需要取消 lineNumber 列的排序和过滤
|
||||
if (target.dataset.newType === "lineNumber") {
|
||||
const sortExist = data.view.sorts.find((sort) => sort.column === options.colId);
|
||||
if (sortExist) {
|
||||
const oldSorts = Object.assign([], data.view.sorts);
|
||||
const newSorts = data.view.sorts.filter((sort) => sort.column !== options.colId);
|
||||
|
||||
transaction(options.protyle, [{
|
||||
action: "setAttrViewSorts",
|
||||
avID: data.id,
|
||||
data: newSorts,
|
||||
blockID,
|
||||
}], [{
|
||||
action: "setAttrViewSorts",
|
||||
avID: data.id,
|
||||
data: oldSorts,
|
||||
blockID,
|
||||
}]);
|
||||
}
|
||||
|
||||
const filterExist = data.view.filters.find((filter) => filter.column === options.colId);
|
||||
if (filterExist) {
|
||||
const oldFilters = JSON.parse(JSON.stringify(data.view.filters));
|
||||
const newFilters = data.view.filters.filter((filter) => filter.column !== options.colId);
|
||||
|
||||
transaction(options.protyle, [{
|
||||
action: "setAttrViewFilters",
|
||||
avID: data.id,
|
||||
data: newFilters,
|
||||
blockID
|
||||
}], [{
|
||||
action: "setAttrViewFilters",
|
||||
avID: data.id,
|
||||
data: oldFilters,
|
||||
blockID
|
||||
}]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
avPanelElement.remove();
|
||||
event.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue