Skip to content

Commit

Permalink
🐛 Registration attribute *is* supported on cosign v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Dec 12, 2023
1 parent 3f6ea05 commit 7ac0429
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/formio/components/cosign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface CosignV1ComponentSchema extends Omit<CosignV1InputSchema, KeysT
authPlugin: string; // plugin identifiers in the backend are dynamic
}

type V2KeysToOmit = 'hideLabel' | 'disabled' | 'placeholder' | 'registration';
type V2KeysToOmit = 'hideLabel' | 'disabled' | 'placeholder';

/**
* The cosign component type, otherwise known as 'Cosign'.
Expand Down
17 changes: 4 additions & 13 deletions test-d/formio/components/cosign-v2.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ expectAssignable<CosignV2ComponentSchema>({
// translatedErrors is converted into errors by the backend
required: 'Je moet een waarde opgeven!!!',
},
// registration tab in builder form
registration: {
attribute: 'foo',
},
// translations tab in builder form
openForms: {
translations: {
Expand Down Expand Up @@ -110,16 +114,3 @@ expectNotAssignable<CosignV2ComponentSchema>({
authPlugin: 'digid',
confirmationRecipient: true,
});

// registration attributes are not supported
expectNotAssignable<CosignV2ComponentSchema>({
id: 'yejak',
type: 'cosign' as const,
validateOn: 'blur' as const,
key: 'someCoSign',
label: 'Some cosign',
authPlugin: 'digid',
registration: {
attribute: 'foo',
},
});

0 comments on commit 7ac0429

Please sign in to comment.