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(MenuToggle): incorrect inheritance of HTMLInputElement #11145

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jelly
Copy link
Contributor

@jelly jelly commented Oct 29, 2024

MenuToggleCheckboxProps inherits from HTMLInputElement and defaultChecked is typed there as undefined | boolean, null is not a valid type.

Found by typescript's tsc in strict mode.

MenuToggleCheckboxProps inherits from HTMLInputElement and
defaultChecked is typed there as `undefined | boolean`, null is not a
valid type.

Found by typescript's `tsc` in strict mode.
@patternfly-build
Copy link
Contributor

patternfly-build commented Oct 29, 2024

@tlabaj tlabaj requested a review from kmcfaul October 29, 2024 14:51
Copy link
Contributor

@kmcfaul kmcfaul left a comment

Choose a reason for hiding this comment

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

LGTM. It might have gotten set that way because isChecked is boolean | null to support indeterminate checkboxes, but defaultChecked should be just a boolean.

@tlabaj tlabaj requested review from a team, wise-king-sullyman, tlabaj and mattnolting and removed request for a team, wise-king-sullyman and mattnolting November 13, 2024 14:44
@tlabaj tlabaj merged commit 838d64a into patternfly:main Nov 13, 2024
13 checks passed
@jelly jelly deleted the menutoggle-defaultchecked branch November 13, 2024 14:47
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.

4 participants