Browse Source
Merge pull request #6640 from mslourens/pass_untruncated_title_to_radiogroup
Pass a title property with untruncated text to the RadioGroup
pull/7524/head
Martin McKeaveney
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
6 additions and
1 deletions
-
packages/bbui/src/Form/Core/RadioGroup.svelte
-
packages/bbui/src/Form/RadioGroup.svelte
-
packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte
-
packages/client/src/components/app/forms/OptionsField.svelte
|
|
|
@ -10,6 +10,7 @@ |
|
|
|
export let disabled = false |
|
|
|
export let getOptionLabel = option => option |
|
|
|
export let getOptionValue = option => option |
|
|
|
export let getOptionTitle = option => option |
|
|
|
|
|
|
|
const dispatch = createEventDispatcher() |
|
|
|
const onChange = e => dispatch("change", e.target.value) |
|
|
|
@ -19,7 +20,7 @@ |
|
|
|
{#if options && Array.isArray(options)} |
|
|
|
{#each options as option} |
|
|
|
<div |
|
|
|
title={getOptionLabel(option)} |
|
|
|
title={getOptionTitle(option)} |
|
|
|
class="spectrum-Radio spectrum-FieldGroup-item spectrum-Radio--emphasized" |
|
|
|
class:is-invalid={!!error} |
|
|
|
> |
|
|
|
|
|
|
|
@ -12,6 +12,7 @@ |
|
|
|
export let direction = "vertical" |
|
|
|
export let getOptionLabel = option => extractProperty(option, "label") |
|
|
|
export let getOptionValue = option => extractProperty(option, "value") |
|
|
|
export let getOptionTitle = option => extractProperty(option, "label") |
|
|
|
|
|
|
|
const dispatch = createEventDispatcher() |
|
|
|
const onChange = e => { |
|
|
|
@ -35,6 +36,7 @@ |
|
|
|
{direction} |
|
|
|
{getOptionLabel} |
|
|
|
{getOptionValue} |
|
|
|
{getOptionTitle} |
|
|
|
on:change={onChange} |
|
|
|
/> |
|
|
|
</Field> |
|
|
|
|
|
|
|
@ -467,6 +467,7 @@ |
|
|
|
options={relationshipOptions} |
|
|
|
getOptionLabel={option => option.name} |
|
|
|
getOptionValue={option => option.value} |
|
|
|
getOptionTitle={option => option.alt} |
|
|
|
/> |
|
|
|
{/if} |
|
|
|
<Input |
|
|
|
|
|
|
|
@ -77,6 +77,7 @@ |
|
|
|
{direction} |
|
|
|
on:change={handleChange} |
|
|
|
getOptionLabel={flatOptions ? x => x : x => x.label} |
|
|
|
getOptionTitle={flatOptions ? x => x : x => x.label} |
|
|
|
getOptionValue={flatOptions ? x => x : x => x.value} |
|
|
|
/> |
|
|
|
{/if} |
|
|
|
|