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

fix(FormControl): ensures compatibility with @types/react@18.2.48 #6763

Merged

Conversation

giovannipiller
Copy link
Contributor

Looks like @types/react removed the placeholder attribute from HTMLAttributes.
This may create inconsistencies when using FormControl.

The proposed fix replaces it with a more explicit InputHTMLAttributes.

@kyletsang
Copy link
Member

Do you have a reproducible example where I can test this fix on?

giovannipiller added a commit to giovannipiller/react-bootstrap-pr-example-6763 that referenced this pull request Feb 5, 2024
@giovannipiller
Copy link
Contributor Author

The following code is broken on projects using @types/react >= 18.2.43

const MyProps: FormControlProps = {
  // placeholder has been removed from HTMLAttributes, therefore it's not accepted here
  placeholder: "test",
};

You can checkout this simple project to reproduce: https://github.com/giovannipiller/react-bootstrap-pr-example-6763

@kyletsang kyletsang merged commit 652e709 into react-bootstrap:master Feb 9, 2024
11 of 12 checks passed
@kyletsang
Copy link
Member

Thanks

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.

None yet

2 participants