Skip to content

Conversation

undeletable
Copy link
Contributor

What does this PR do?

It corrects types definitions for additional params of onChange property of FileInput component.

Where should the reviewer start?

FileInput component.

What testing has been done on this PR?

Manual testing with the app that's using TypeScript.

How should this be manually tested?

Add FileInput with onChange property to the render of your component. Try to describe params of onChange precisely.

What are the relevant issues?

#6145 (the fix is incomplete).

Do the grommet docs need to be updated?

No.

Should this PR be mentioned in the release notes?

I think yes.

Is this change backwards compatible or is it a breaking change?

This change might break an app which has incorrect handling of second parameter of onChange (e.g., referring to property of files which doesn't actually exist, but TS wouldn't warn about this with current type definition).

Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

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

Looks good!

@ericsoderberghp ericsoderberghp merged commit 8f6f34a into grommet:master Oct 12, 2022
@undeletable undeletable deleted the fileinput-onchange-typing branch October 13, 2022 11:31
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.

3 participants