mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/15534
This commit is contained in:
parent
1479cb6c00
commit
c3c467e3ee
2 changed files with 3 additions and 3 deletions
|
|
@ -346,7 +346,7 @@ export const goGroupsSort = (options: {
|
|||
const blockID = options.blockElement.getAttribute("data-node-id");
|
||||
const column = getFieldsByData(options.data).find(item => item.id === options.data.view.group.field);
|
||||
(["created", "date", "created", "updated"].includes(column.type) ? [0, 1] : (
|
||||
["mSelect", "select"].includes(column.type) ? [2, 0, 1, 3] : [2, 0, 1]
|
||||
["mSelect", "select"].includes(column.type) ? [3, 2, 0, 1] : [2, 0, 1]
|
||||
)).forEach((item) => {
|
||||
const label = getLanguageByIndex(item, "sort");
|
||||
menu.addItem({
|
||||
|
|
|
|||
|
|
@ -452,8 +452,8 @@ func SetAttributeViewGroup(avID, blockID string, group *av.ViewGroup) (err error
|
|||
|
||||
if firstInit || changeGroupField {
|
||||
if groupKey := view.GetGroupKey(attrView); nil != groupKey && (av.KeyTypeSelect == groupKey.Type || av.KeyTypeMSelect == groupKey.Type) {
|
||||
// 首次设置分组时,如果分组字段是单选或多选类型,则将分组方式改为手动排序,并按选项顺序排序分组视图 https://github.com/siyuan-note/siyuan/issues/15491
|
||||
view.Group.Order = av.GroupOrderMan
|
||||
// 首次设置分组时,如果分组字段是单选或多选类型,则将分组方式改为按选项排序 https://github.com/siyuan-note/siyuan/issues/15534
|
||||
view.Group.Order = av.GroupOrderSelectOption
|
||||
sortGroupsBySelectOption(view, groupKey)
|
||||
for i, g := range view.Groups {
|
||||
g.GroupSort = i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue