Browse Source

Merge pull request #4107 from mslourens/options_radio_button_alignment

#3397 - select radio buttons alignment setting
pull/4108/head
Michael Drury 4 years ago
committed by GitHub
parent
commit
2f0503ef00
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      packages/client/manifest.json
  2. 2
      packages/client/src/components/app/forms/OptionsField.svelte

20
packages/client/manifest.json

@ -2065,6 +2065,26 @@
}
]
},
{
"type": "select",
"label": "Direction",
"key": "direction",
"defaultValue": "vertical",
"options": [
{
"label": "Horizontal",
"value": "horizontal"
},
{
"label": "Vertical",
"value": "vertical"
}
],
"dependsOn": {
"setting": "optionsType",
"value": "radio"
}
},
{
"type": "text",
"label": "Default value",

2
packages/client/src/components/app/forms/OptionsField.svelte

@ -15,6 +15,7 @@
export let valueColumn
export let customOptions
export let autocomplete = false
export let direction = "vertical"
let fieldState
let fieldApi
@ -64,6 +65,7 @@
disabled={fieldState.disabled}
error={fieldState.error}
{options}
{direction}
on:change={e => fieldApi.setValue(e.detail)}
getOptionLabel={flatOptions ? x => x : x => x.label}
getOptionValue={flatOptions ? x => x : x => x.value}

Loading…
Cancel
Save