Skip to content

Commit

Permalink
fix(QtySelector): remove onValueUpdated prop (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
kat-chen-tm committed Mar 5, 2021
1 parent 110e981 commit b9a3228
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 0 additions & 4 deletions catalog/pages/inputs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1273,10 +1273,6 @@ rows:
Type: function
Default:
Notes: call back function after value is updated either by buttons or keyboard. Use this function instead of onChange.
- Prop: onValueChanged
Type: function
Default:
Notes: deprecated. Use handleValueUpdate instead.
- Prop: incrementBtnLabel
Type: string
Default: Increase Quantity
Expand Down
5 changes: 1 addition & 4 deletions src/components/Input/QtySelector/QtySelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class QtySelector extends Component {
max: PropTypes.number,
checkValue: PropTypes.func,
handleValueUpdate: PropTypes.func,
onValueUpdated: PropTypes.func,
incrementBtnLabel: PropTypes.string,
decrementBtnLabel: PropTypes.string
};
Expand All @@ -49,7 +48,6 @@ class QtySelector extends Component {
max: QtySelector.MAX_INPUT_VALUE,
checkValue: () => true,
handleValueUpdate: () => {},
onValueUpdated: () => {},
incrementBtnLabel: "Increase Quantity",
decrementBtnLabel: "Decrease Quantity"
};
Expand Down Expand Up @@ -119,10 +117,9 @@ class QtySelector extends Component {
};

handleValueUpdated = () => {
const { handleValueUpdate, onValueUpdated } = this.props;
const { handleValueUpdate } = this.props;
const { value } = this.state;
handleValueUpdate(value);
onValueUpdated(value);
};

handleFocus = () => {
Expand Down

0 comments on commit b9a3228

Please sign in to comment.