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

Replace props spreading with explicit attributes to avoid warnings #159

Merged
merged 1 commit into from
May 15, 2023

Conversation

iandunn
Copy link
Member

@iandunn iandunn commented May 11, 2023

Fixes #152

This adds the necessary parameters explicitly, instead of spreading props.

Related #127

@iandunn iandunn marked this pull request as draft May 11, 2023 18:55
Unintentionally passing invalid HTML attributes results in console warnings like these:

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

> Warning: Unknown event handler property `onComplete`. It will be ignored.
@iandunn iandunn marked this pull request as ready for review May 11, 2023 19:04
Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

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

Works for me

Copy link
Contributor

@renintw renintw left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, looks good 👍

Copy link
Contributor

@renintw renintw left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, looks good 👍

@iandunn iandunn merged commit d8879df into trunk May 15, 2023
@iandunn iandunn deleted the input-props-spread branch May 15, 2023 16:37
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.

setInputs / onComplete gets passed to <input> element
3 participants