From b9a322876984ec43783cddf97e42d761c19b6bc6 Mon Sep 17 00:00:00 2001 From: kat-chen-tm <70346175+kat-chen-tm@users.noreply.github.com> Date: Fri, 5 Mar 2021 14:38:40 -0800 Subject: [PATCH] fix(QtySelector): remove onValueUpdated prop (#681) --- catalog/pages/inputs/index.md | 4 ---- src/components/Input/QtySelector/QtySelector.js | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/catalog/pages/inputs/index.md b/catalog/pages/inputs/index.md index 98162df4c..9ab99b59c 100644 --- a/catalog/pages/inputs/index.md +++ b/catalog/pages/inputs/index.md @@ -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 diff --git a/src/components/Input/QtySelector/QtySelector.js b/src/components/Input/QtySelector/QtySelector.js index 965fcddc7..1ad7ff487 100644 --- a/src/components/Input/QtySelector/QtySelector.js +++ b/src/components/Input/QtySelector/QtySelector.js @@ -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 }; @@ -49,7 +48,6 @@ class QtySelector extends Component { max: QtySelector.MAX_INPUT_VALUE, checkValue: () => true, handleValueUpdate: () => {}, - onValueUpdated: () => {}, incrementBtnLabel: "Increase Quantity", decrementBtnLabel: "Decrease Quantity" }; @@ -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 = () => {