Skip to content

Commit

Permalink
Merge pull request #194 from open-formulieren/issue/4772-select-compo…
Browse files Browse the repository at this point in the history
…nent-datatype-string

🐛 [open-formulieren/open-forms#4772] Set select dataType to string
  • Loading branch information
sergei-maertens authored Nov 12, 2024
2 parents dd15415 + f514254 commit 2894c3e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@formatjs/cli": "^6.1.1",
"@formatjs/ts-transformer": "^3.12.0",
"@fortawesome/fontawesome-free": "^6.4.0",
"@open-formulieren/types": "^0.33.0",
"@open-formulieren/types": "^0.34.0",
"@storybook/addon-actions": "^8.3.5",
"@storybook/addon-essentials": "^8.3.5",
"@storybook/addon-interactions": "^8.3.5",
Expand Down
2 changes: 2 additions & 0 deletions src/components/ComponentConfiguration.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,7 @@ export const Select: Story = {
clearOnHide: true,
isSensitiveData: false,
dataSrc: 'values',
dataType: 'string',
data: {
values: [
{
Expand Down Expand Up @@ -1726,6 +1727,7 @@ export const Select: Story = {
clearOnHide: true,
isSensitiveData: false,
dataSrc: 'values',
dataType: 'string',
data: {},
openForms: {
dataSrc: 'variable',
Expand Down
1 change: 1 addition & 0 deletions src/registry/select/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ EditForm.defaultValues = {
// fixed, this is what itemsExpression results in via the backend. Do not confuse with
// openForms.dataSrc!
dataSrc: 'values',
dataType: 'string',
data: {values: [{value: '', label: ''}]},
// TODO: at some point we can allow an itemsExpression for this too
// Note: Formio will override this to `null`! So be careful when dealing with
Expand Down

0 comments on commit 2894c3e

Please sign in to comment.