Skip to content

Commit

Permalink
✨ [open-formulieren/open-forms#4813] Added prefill tab to number edit
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmolen committed Nov 8, 2024
1 parent 8b48584 commit 204d7e5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/registry/number/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
IsSensitiveData,
Key,
Label,
Prefill,
PresentationConfig,
Registration,
SimpleConditional,
Expand Down Expand Up @@ -58,6 +59,7 @@ const EditForm: EditFormDefinition<NumberComponentSchema> = () => {
<BuilderTabs.Advanced hasErrors={hasAnyError('conditional')} />
<BuilderTabs.Validation hasErrors={hasAnyError('validate')} />
<BuilderTabs.Registration hasErrors={hasAnyError('registration')} />
<BuilderTabs.Prefill hasErrors={hasAnyError('prefill')} />

Check failure on line 62 in src/registry/number/edit.tsx

View workflow job for this annotation

GitHub Actions / Create 'production' build

Argument of type '"prefill"' is not assignable to parameter of type '"type" | "key" | "id" | "hidden" | "label" | "prefix" | "disabled" | "description" | "tooltip" | "defaultValue" | "suffix" | "validate" | "clearOnHide" | "conditional" | "errors" | "validateOn" | "showInSummary" | "showInEmail" | "showInPDF" | "isSensitiveData" | "openForms" | "registration" | "translatedErrors" | "registration.attribute" | "decimalLimit" | "allowNegative" | "validate.required" | "validate.plugins" | "conditional.show" | "conditional.json" | "conditional.when" | "conditional.eq" | "errors.required" | "translatedErrors.en" | "translatedErrors.nl" | "openForms.translations" | "openForms.translations.en" | "openForms.translations.nl" | "openForms.translations.en.label" | "openForms.translations.en.description" | "openForms.translations.en.tooltip" | "openForms.translations.nl.label" | "openForms.translations.nl.description" | "openForms.translations.nl.tooltip" | "translatedErrors.en.required" | "translatedErrors.nl.required" | "validate.max" | "validate.min" | "errors.max" | "errors.min" | "translatedErrors.en.max" | "translatedErrors.en.min" | "translatedErrors.nl.max" | "translatedErrors.nl.min" | "openForms.translations.en.suffix" | "openForms.translations.nl.suffix"'.
<BuilderTabs.Translations hasErrors={hasAnyError('openForms.translations')} />
</TabList>

Expand Down Expand Up @@ -96,6 +98,11 @@ const EditForm: EditFormDefinition<NumberComponentSchema> = () => {
<Registration.RegistrationAttributeSelect />
</TabPanel>

{/* Prefill tab */}
<TabPanel>
<Prefill.PrefillConfiguration />
</TabPanel>

{/* Translations */}
<TabPanel>
<Translations.ComponentTranslations<NumberComponentSchema>
Expand Down Expand Up @@ -148,6 +155,11 @@ EditForm.defaultValues = {
registration: {
attribute: '',
},
prefill: {

Check failure on line 158 in src/registry/number/edit.tsx

View workflow job for this annotation

GitHub Actions / Create 'production' build

Type '{ label: string; key: string; description: string; tooltip: string; showInSummary: true; showInEmail: false; showInPDF: true; hidden: false; clearOnHide: true; isSensitiveData: false; defaultValue: null; decimalLimit: undefined; allowNegative: false; suffix: string; conditional: { show: undefined; when: string; eq: string; }; validate: { required: false; plugins: never[]; min: undefined; max: undefined; }; translatedErrors: {}; registration: { attribute: string; }; prefill: { plugin: string; attribute: string; identifierRole: string; }; }' is not assignable to type 'Omit<BaseNumberComponentSchema, "type" | "id">'.
plugin: '',
attribute: '',
identifierRole: 'main',
},
};

const DefaultValue: React.FC = () => {
Expand Down

0 comments on commit 204d7e5

Please sign in to comment.