Skip to content

Commit

Permalink
Merge pull request #206 from open-formulieren/of-5006/add-autoPopulat…
Browse files Browse the repository at this point in the history
…ed-field-for-addressNL

[OF#5006] Update addressNL component with `autoPopulated` field
  • Loading branch information
vaszig authored Jan 24, 2025
2 parents 10c1985 + 0a505dc commit edb202c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/ComponentConfiguration.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2360,6 +2360,9 @@ export const AddressNL: Story = {
required: false,
},
deriveAddress: false,
defaultValue: {
autoPopulated: false,
},
layout: 'singleColumn',
openForms: {
components: {
Expand Down
3 changes: 3 additions & 0 deletions src/components/ComponentPreview.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,9 @@ export const AddressNL: Story = {
},
deriveAddress: false,
layout: 'singleColumn',
defaultValue: {
autoPopulated: false,
},
},
},
};
Expand Down
1 change: 1 addition & 0 deletions src/registry/addressNL/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export default {
city: '',
streetName: '',
secretStreetCity: '',
autoPopulated: false,
},
} satisfies RegistryEntry<AddressNLComponentSchema>;
2 changes: 2 additions & 0 deletions src/registry/addressNL/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const Preview: React.FC<ComponentPreviewProps<AddressNLComponentSchema>> = ({com
/>
}
disabled
required={required}
/>
<TextField
name={`${key}.streetNumber`}
Expand All @@ -80,6 +81,7 @@ const Preview: React.FC<ComponentPreviewProps<AddressNLComponentSchema>> = ({com
/>
}
disabled
required={required}
/>
</>
)}
Expand Down

0 comments on commit edb202c

Please sign in to comment.