Browse Source
Merge pull request #6184 from actus-ag/feature/optiontype-sort-order
feat: toggle for sort order in options type field
master
Martin McKeaveney
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
1 deletions
-
packages/client/manifest.json
-
packages/client/src/components/app/forms/OptionsField.svelte
|
|
|
@ -2448,6 +2448,12 @@ |
|
|
|
"value": "select" |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
"type": "boolean", |
|
|
|
"label": "Sort in alphabetical order", |
|
|
|
"key": "sort", |
|
|
|
"defaultValue": true |
|
|
|
}, |
|
|
|
{ |
|
|
|
"type": "boolean", |
|
|
|
"label": "Disabled", |
|
|
|
|
|
|
|
@ -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"} |
|
|
|
<CoreRadioGroup |
|
|
|
|