-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add iban
and licenseplate
component
#51
Conversation
The type definition of export interface LicensePlateProperties {
type: 'licenseplate';
validate: {
pattern: '^[a-zA-Z0-9]{1,3}\\-[a-zA-Z0-9]{1,3}\\-[a-zA-Z0-9]{1,3}$'; // Should also extend OFValidateOptions?
};
validateOn: 'blur';
} Also, I've removed readonly input checkboxes in last commit for these two components, but I don't see any reference to that attribute in the types, nor in the base formio types? |
Good catch, something seems to have gone wrong there. We should at least check the type tests to see if those also highlight the issue. There may be a forgotten intersection or something like that. |
Hum, there's a test for this and it seems to pass |
interesting 🤔 |
4ef3a97
to
57df6f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted a couple of oversights.
src/registry/iban/edit.tsx
Outdated
defaultValue: '', | ||
placeholder: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised the type checker didn't complain about this one though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems types are incorrect: defaultValue
is not excluded. But Iban is multiple capable, so according to the definition of MultipleCapable
, it would infer never
if we Omit
defaultValue
on the BaseIbanComponentSchema
:/
placeholder
doesn't seem to be Omit
'ed as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultValue
is something we can't/shouldn't omit since formik needs to have one in the renderer anyway, so it can be present in the component definition but not exposed in the form builder
placeholder should be omitted, feel free to file an issue in the types repo
No description provided.