Skip to content

Commit 47ce610

Browse files
committed
feat: add description for multiple toggle
1 parent fb51de7 commit 47ce610

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

packages/form-js-editor/assets/form-js-editor-base.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,3 +839,7 @@
839839
.gu-mirror.fjs-drag-row-move .cds--row {
840840
flex-wrap: nowrap !important;
841841
}
842+
843+
.bio-properties-panel-description .bio-properties-panel-strong {
844+
font-weight: bold;
845+
}

packages/form-js-editor/src/features/properties-panel/entries/MultipleEntry.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ export function MultipleEntry(props) {
2323

2424
function Multiple(props) {
2525
const { editField, field, id } = props;
26-
2726
const debounce = useService('debounce');
28-
2927
const variables = useVariables().map((name) => ({ name }));
30-
3128
const path = ['multiple'];
29+
const fieldValue = get(field, path, false);
3230

3331
const getValue = () => {
34-
return get(field, path, '');
32+
return fieldValue;
3533
};
3634

3735
const setValue = (value) => {
@@ -48,5 +46,15 @@ function Multiple(props) {
4846
inline: true,
4947
setValue,
5048
variables,
49+
description: fieldValue ? (
50+
<>
51+
The picker variable will return an <strong class="bio-properties-panel-strong">array</strong> with multiple
52+
files
53+
</>
54+
) : (
55+
<>
56+
The picker variable will return an <strong class="bio-properties-panel-strong">array</strong> with single
57+
</>
58+
),
5159
});
5260
}

0 commit comments

Comments
 (0)