From 22541721c1b053cd6a79bc04abe5d4424de5e3be Mon Sep 17 00:00:00 2001 From: Maurits Lourens Date: Mon, 11 Jul 2022 15:59:32 +0200 Subject: [PATCH 1/2] Pass a title property with untruncated text to the RadioGroup --- packages/bbui/src/Form/Core/RadioGroup.svelte | 3 ++- packages/bbui/src/Form/RadioGroup.svelte | 2 ++ .../backend/DataTable/modals/CreateEditColumn.svelte | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/bbui/src/Form/Core/RadioGroup.svelte b/packages/bbui/src/Form/Core/RadioGroup.svelte index 18a1e82ee8..a3952a9759 100644 --- a/packages/bbui/src/Form/Core/RadioGroup.svelte +++ b/packages/bbui/src/Form/Core/RadioGroup.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}
diff --git a/packages/bbui/src/Form/RadioGroup.svelte b/packages/bbui/src/Form/RadioGroup.svelte index 528f9f5eba..843a3657b4 100644 --- a/packages/bbui/src/Form/RadioGroup.svelte +++ b/packages/bbui/src/Form/RadioGroup.svelte @@ -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} /> diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 77ab75827f..a6cef23467 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -474,6 +474,7 @@ options={relationshipOptions} getOptionLabel={option => option.name} getOptionValue={option => option.value} + getOptionTitle={option => option.alt} /> {/if} Date: Mon, 25 Jul 2022 09:49:37 +0200 Subject: [PATCH 2/2] add missing props --- packages/client/src/components/app/forms/OptionsField.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/components/app/forms/OptionsField.svelte b/packages/client/src/components/app/forms/OptionsField.svelte index 1df0216f56..dd90591569 100644 --- a/packages/client/src/components/app/forms/OptionsField.svelte +++ b/packages/client/src/components/app/forms/OptionsField.svelte @@ -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}