Skip to content

Commit 32db691

Browse files
authored
Merge pull request #21 from lara-zeus/fix-manuall
fix manually entering the number
2 parents bcca972 + 6ad627e commit 32db691

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/views/quantity.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
isDisabled: {{ $isDisabled ? 'true' : 'false' }},
5858
increment() {
5959
if(! this.isDisabled && this.state < this.maxValue && this.state >= this.minValue){
60-
this.state = this.state + this.steps
60+
this.state = parseInt(this.state) + this.steps
6161
$wire.$refresh()
6262
if(this.state == this.maxValue){
6363
this.isIncrementAllowed = false
@@ -69,7 +69,7 @@
6969
},
7070
decrement() {
7171
if(! this.isDisabled && this.state > 0 && this.state <= this.maxValue && this.state > this.minValue) {
72-
this.state = this.state - this.steps
72+
this.state = parseInt(this.state) - this.steps
7373
$wire.$refresh()
7474
if(this.state == this.minValue) {
7575
this.isDecrementAllowed = false

0 commit comments

Comments
 (0)