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

Adds type of onChange to RangeInput #6974

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vinodkv2511
Copy link
Contributor

Improves event handler type for RangeInput component.

What does this PR do?
Improves event handler type for RageInput component.

Where should the reviewer start?
index.d.ts of RangeInput

What testing has been done on this PR?
Checked the types locally

How should this be manually tested?
Verify the typing

Do Jest tests follow these best practices?
Not applicable

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • userEvent is used in place of fireEvent.
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?
#3165

Screenshots (if appropriate)

Do the grommet docs need to be updated?

Should this PR be mentioned in the release notes?

Is this change backwards compatible or is it a breaking change?
May be breaking for people using typescript. Because we are now making the type stricter.

@jcfilben jcfilben added PRty Biweekly PR reviews by grommet team with hoping of closing such PRs hacktoberfest-accepted Accepted PRs during hacktoberfest period labels Oct 26, 2023
Omit<JSX.IntrinsicElements['input'], 'color' | 'step' | 'value'> {}
Omit<
JSX.IntrinsicElements['input'],
'color' | 'step' | 'value' | 'onChange'
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the difference between the default onChange that is passed though the intrinsic element and the onChange type defined on line 19?

@jcfilben jcfilben added waiting Awaiting response to latest comments and removed PRty Biweekly PR reviews by grommet team with hoping of closing such PRs labels Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accepted PRs during hacktoberfest period waiting Awaiting response to latest comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants