Skip to content
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

Adds missing props to InputBase types #228

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

illusionalsagacity
Copy link
Contributor

inputBaseComponentProps: minLength, wrap
publicProps: maxLength, minLength, wrap

resolves #224

Copy link
Contributor Author

@illusionalsagacity illusionalsagacity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I noticed, the TextField didn't automatically get these like I thought it would--it extends FormControl.publicProps instead. Should I also add these to TextField.props explicitly or is there a different approach you all would prefer?

@fhammerschmidt
Copy link
Member

Yes, please spread them into the TextField props if possible. There might be an overlap though.

@illusionalsagacity
Copy link
Contributor Author

illusionalsagacity commented Feb 25, 2025

Yes, please spread them into the TextField props if possible. There might be an overlap though.

@fhammerschmidt I've pushed a WIP commit that shows one way we could accomplish this, by creating more 'partial' record types and composing them more directly where they're being used

| @as("soft") Soft
| @as("off") Off

type inputBaseComponentPublicProps = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this should probably be in CommonProps for inputs / textarea props

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please move them.

@fhammerschmidt
Copy link
Member

Apart from the conflicts and the commented-out props that got overridden (I think you can just remove them), is this ready?

inputBaseComponentProps: minLength, wrap
publicProps: maxLength, minLength, wrap

resolves cca-io#224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InputBase props missing maxLength, minLength, wrap props for text areas
2 participants