From 554954d81c275cf6ab44eb0769ba33207237b725 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 6 Oct 2022 12:59:56 +0200 Subject: [PATCH 1/2] updated schema for openByDefault --- schemas/json/layout/layout.schema.v1.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/schemas/json/layout/layout.schema.v1.json b/schemas/json/layout/layout.schema.v1.json index d974f71d..0f5ac79e 100644 --- a/schemas/json/layout/layout.schema.v1.json +++ b/schemas/json/layout/layout.schema.v1.json @@ -419,8 +419,14 @@ }, "openByDefault": { "title": "Open by default", - "description": "Boolean value indicating if group should be opened to add a new item by default when no items exist.", - "type": "boolean" + "description": "Boolean or string indicating if group should be opened by default. If no items exist: 'first', 'last', and true adds a new item. If items are prefilled: 'first' and true opens the first item, and 'last' opens the last item in the group.", + "oneOf": [ + { "type": "boolean" }, + { + "type": "string", + "enum": ["first", "last"] + } + ] } } }, From c5ee3b7b65b4c912e14af3b2900efbab7b425d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20=C3=98sttveit?= <47412359+bjosttveit@users.noreply.github.com> Date: Fri, 7 Oct 2022 14:36:53 +0200 Subject: [PATCH 2/2] Update schemas/json/layout/layout.schema.v1.json Co-authored-by: Ole Martin Handeland --- schemas/json/layout/layout.schema.v1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/json/layout/layout.schema.v1.json b/schemas/json/layout/layout.schema.v1.json index 0f5ac79e..d4be6f90 100644 --- a/schemas/json/layout/layout.schema.v1.json +++ b/schemas/json/layout/layout.schema.v1.json @@ -419,7 +419,7 @@ }, "openByDefault": { "title": "Open by default", - "description": "Boolean or string indicating if group should be opened by default. If no items exist: 'first', 'last', and true adds a new item. If items are prefilled: 'first' and true opens the first item, and 'last' opens the last item in the group.", + "description": "Boolean or string indicating if group should be opened by default. If no items exist: 'first', 'last', and true adds a new item. If items exist already, true does not open anything, but 'first' opens the first item, and 'last' opens the last item in the group.", "oneOf": [ { "type": "boolean" }, {