-
Notifications
You must be signed in to change notification settings - Fork 841
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
Range TS #2349
Range TS #2349
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
@@ -62,7 +62,9 @@ declare module '@elastic/eui' { | |||
} | |||
|
|||
export const EuiRange: FunctionComponent< | |||
CommonProps & InputHTMLAttributes<HTMLInputElement> & EuiRangeProps | |||
CommonProps & | |||
Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case if we don't omit onChange
def from InputHTMLAttributes<HTMLInputElement>
, EuiRange
's onChange
requires ((event: React.ChangeEvent<HTMLInputElement>) => void) & ((event: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>, isValid: boolean) => void))
def.
@chandlerprall getting back to the comment #2211 (comment), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM, created an empty typescript project locally, added EUI as a dependency, and verified the bug before this change and that it is fixed with this it.
Needs a bugfix entry to CHANGELOG.md before merging
jenkins test this |
You can access if (e.currentTarget instanceof HTMLInputElement) {
... do something with e.currentTarget.valueAsNumber ...
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM! Tested locally by consuming change in an new TS project
Summary
This PR updates TS def for
onChange
method ofEuiRange
.