From 77f778df29e19a909ee93b1445e852151ee3c08c Mon Sep 17 00:00:00 2001 From: Philipp Wirtenberger Date: Thu, 12 May 2022 16:17:23 +0200 Subject: [PATCH 1/3] feat: toggle for sort order in options type field --- packages/client/manifest.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index b36563b202..0230bf3942 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -2226,6 +2226,12 @@ "value": "select" } }, + { + "type": "boolean", + "label": "Sort in lexographic order", + "key": "sort", + "defaultValue": true + }, { "type": "boolean", "label": "Disabled", From 6909e02e785a85ab2be302f61e4eaa102b7eac12 Mon Sep 17 00:00:00 2001 From: Philipp Wirtenberger <104622748+actus-wirtenberger@users.noreply.github.com> Date: Tue, 7 Jun 2022 09:27:41 +0200 Subject: [PATCH 2/3] chore: reword options type sort order label Co-authored-by: Martin McKeaveney --- packages/client/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 0230bf3942..01823b2c2c 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -2228,7 +2228,7 @@ }, { "type": "boolean", - "label": "Sort in lexographic order", + "label": "Sort in alphabetical order", "key": "sort", "defaultValue": true }, From 31543964ff5ce7e2c1761ebdcf3058986145fd2c Mon Sep 17 00:00:00 2001 From: Philipp Wirtenberger Date: Tue, 7 Jun 2022 09:49:19 +0200 Subject: [PATCH 3/3] fix: pass `sort` parameter through the options picker --- packages/client/src/components/app/forms/OptionsField.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/app/forms/OptionsField.svelte b/packages/client/src/components/app/forms/OptionsField.svelte index c0f98ed827..1df0216f56 100644 --- a/packages/client/src/components/app/forms/OptionsField.svelte +++ b/packages/client/src/components/app/forms/OptionsField.svelte @@ -17,6 +17,7 @@ export let autocomplete = false export let direction = "vertical" export let onChange + export let sort = true let fieldState let fieldApi @@ -64,7 +65,7 @@ getOptionLabel={flatOptions ? x => x : x => x.label} getOptionValue={flatOptions ? x => x : x => x.value} {autocomplete} - sort={true} + {sort} /> {:else if optionsType === "radio"}