Skip to content

Commit

Permalink
fix(react): added condition check before calling onblur (#12207)
Browse files Browse the repository at this point in the history
* fix(react): added condition check before calling onblur. closes #12187

* fix(slider): update conditional onBlur call

* chore(slider): remove testing code

* chore(slider): formatting

Co-authored-by: Taylor Jones <[email protected]>
Co-authored-by: TJ Egan <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
4 people committed Oct 7, 2022
1 parent e6e65b0 commit 20ba60a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ export default class Slider extends PureComponent {
const { value } = evt.target;

this.setState({ isValid: validity });
this.props.onBlur({ value });
this.props.onBlur?.({ value });
};

/**
Expand Down

0 comments on commit 20ba60a

Please sign in to comment.