Skip to content

Commit

Permalink
Merge pull request #52 from FosterCommerce/feat/debounce-input-for-se…
Browse files Browse the repository at this point in the history
…ven-seconds

feat: debounce inputs
  • Loading branch information
nedu64 authored Nov 12, 2024
2 parents d86b782 + 4a32301 commit 3564bf1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/web/assets/checkout/dist/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ const LineItem = (props) => {
sending: false,
input() {
this.qty = this.qty.replace(/\D/g, '');
if(this.qty) {
this.updateQty();
}
setTimeout(() => {
if(this.qty) {
this.updateQty();
}
}, 700);
},
increment() {
this.removeMessages();
Expand Down

0 comments on commit 3564bf1

Please sign in to comment.