Skip to content

Commit

Permalink
fix(BaseInputNumber): disabled state bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stafyniaksacha committed Nov 28, 2023
1 parent 7ff502c commit 35c2ecf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 8 additions & 0 deletions components/form/BaseInputNumber.vue
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ function clamp(value: number) {
}
function increment() {
if (props.disabled) return
if (value.value === undefined) {
value.value = 0
return
Expand All @@ -282,6 +284,8 @@ function increment() {
}
function decrement() {
if (props.disabled) return
if (value.value === undefined) {
value.value = 0
return
Expand All @@ -294,6 +298,8 @@ function decrement() {
let incrementInterval: any
function startIncrement() {
if (props.disabled) return
increment()
let i = 0
Expand All @@ -312,6 +318,8 @@ function stopIncrement() {
let decrementInterval: any
function startDecrement() {
if (props.disabled) return
decrement()
let i = 0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@iconify/vue": "^4.1.1",
"@nuxtjs/color-mode": "^3.3.2",
"@nuxtjs/tailwindcss": "^6.9.4",
"@shuriken-ui/tailwind": "^1.5.1",
"@shuriken-ui/tailwind": "^1.5.2",
"@vueuse/nuxt": "^10.6.1",
"autoprefixer": "^10.4.16",
"nuxt-icon": "^0.6.6"
Expand Down
12 changes: 8 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 35c2ecf

Please sign in to comment.