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

Add "inputSize" to InputGroup's filtered non-HTML props #7284

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

ggdouglas
Copy link
Contributor

@ggdouglas ggdouglas commented Feb 28, 2025

Proposed changes:

Issue raised in #7232 (comment), related to #7232

Fixes the following React warning coming from InputGroup:

Warning: React does not recognize the `inputSize` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `inputsize` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

This occurs when either using inputSize on InputGroup, e.g.

<InputGroup inputSize={10} />

or when using a component that wraps InputGroup and sets inputSize, like NumericInput.


Adds inputSize to NON_HTML_PROPS so that it is filtered out when it is passed to removeNonHTMLProps.

const NON_HTML_PROPS: Array<keyof InputGroupProps> = ["onValueChange"];

...removeNonHTMLProps(this.props, NON_HTML_PROPS, true),

@svc-palantir-github
Copy link

Add "inputSize" to InputGroup's filtered non-HTML props

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas merged commit 3b16ae8 into develop Feb 28, 2025
14 checks passed
@ggdouglas ggdouglas deleted the gdouglas/fix-input-group-non-html-prop branch February 28, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants