From fd092a3eb149a1a491b464303a6ee49236023dcc Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sun, 7 Jul 2024 15:26:08 +0300 Subject: [PATCH] group index -100 --- client/src/views/modal.js | 2 +- client/src/views/record/detail.js | 2 +- client/src/views/record/row-actions/default.js | 2 +- schema/metadata/clientDefs.json | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/client/src/views/modal.js b/client/src/views/modal.js index 9134cf19ca..b2fddc5764 100644 --- a/client/src/views/modal.js +++ b/client/src/views/modal.js @@ -557,7 +557,7 @@ class ModalView extends View { return; } - const index = item.groupIndex === undefined ? 9999 : item.groupIndex; + const index = (item.groupIndex === undefined ? 9999 : item.groupIndex) + 100; if (dropdownGroups[index] === undefined) { dropdownGroups[index] = []; diff --git a/client/src/views/record/detail.js b/client/src/views/record/detail.js index f21159ffc2..33081fea04 100644 --- a/client/src/views/record/detail.js +++ b/client/src/views/record/detail.js @@ -1744,7 +1744,7 @@ class DetailRecordView extends BaseRecordView { return; } - const index = item.groupIndex === undefined ? 9999 : item.groupIndex; + const index = (item.groupIndex === undefined ? 9999 : item.groupIndex) + 100; if (dropdownGroups[index] === undefined) { dropdownGroups[index] = []; diff --git a/client/src/views/record/row-actions/default.js b/client/src/views/record/row-actions/default.js index df49ce9cef..6b7db04a16 100644 --- a/client/src/views/record/row-actions/default.js +++ b/client/src/views/record/row-actions/default.js @@ -172,7 +172,7 @@ class DefaultRowActionsView extends View { return; } - const index = item.groupIndex === undefined ? 9999 : item.groupIndex; + const index = (item.groupIndex === undefined ? 9999 : item.groupIndex) + 100; if (dropdownGroups[index] === undefined) { dropdownGroups[index] = []; diff --git a/schema/metadata/clientDefs.json b/schema/metadata/clientDefs.json index 5d34c0c5d8..ac4f5f14a3 100644 --- a/schema/metadata/clientDefs.json +++ b/schema/metadata/clientDefs.json @@ -159,7 +159,7 @@ }, "groupIndex": { "type": "integer", - "minimum": 0, + "minimum": -100, "description": "A group index." } } @@ -573,7 +573,8 @@ "properties": { "groupIndex": { "type": "integer", - "description": "A group index. Groups are separated by a divider." + "description": "A group index. Groups are separated by a divider.", + "minimum": -100 }, "handler": { "description": "A handler class for the mass action.", @@ -1092,7 +1093,7 @@ }, "groupIndex": { "type": "integer", - "minimum": 0, + "minimum": -100, "description": "A group index" } }