Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UInputNumber changes value on blur when not asked for #2859

Open
projct1 opened this issue Dec 7, 2024 · 0 comments
Open

UInputNumber changes value on blur when not asked for #2859

projct1 opened this issue Dec 7, 2024 · 0 comments
Labels
bug Something isn't working triage v3 #1289

Comments

@projct1
Copy link

projct1 commented Dec 7, 2024

Environment

  • Operating System: Linux
  • Node Version: v22.4.0
  • Nuxt Version: 3.14.1592
  • CLI Version: 3.16.0
  • Nitro Version: 2.10.4
  • Package Manager: pnpm@9.14.4
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxt/ui@3.0.0-alpha.9, nuxt-auth-sanctum@0.5.2, @vueuse/nuxt@11.3.0, nuxt-file-storage@0.2.9
  • Build Modules: -

Is this bug related to Nuxt or Vue?

Nuxt

Version

3.14.1592

Reproduction

<script setup lang="ts">
const bill = defineModel()
const calcStep = (value: int): int => value < 1000 ? 100 : 500
</script>

<template>
  <div class="flex gap-4 items-center">
    от <UInputNumber v-model="bill.from" :min="0" :max="bill.to || 10000" :step="calcStep(bill.from)" variant="soft" class="max-w-32" />
    до <UInputNumber v-model="bill.to" :min="bill.from" :max="10000" :step="calcStep(bill.to)" variant="soft" class="max-w-32" />
  </div>
</template>

Description

https://skr.sh/vT5m5gCX1Bk

The value changes when clicking outside the field, regardless of the step and modelValue state. The step parameter is also calculated incorrectly at the threshold of 1000.

@projct1 projct1 added bug Something isn't working triage v3 #1289 labels Dec 7, 2024
@projct1 projct1 changed the title UInputNumber triggers @change twice UInputNumber changes value on blur when not asked for Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage v3 #1289
Projects
None yet
Development

No branches or pull requests

1 participant