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

Slider yields float values when not dragging handles beforehand #7257

Open
2 of 4 tasks
justomio opened this issue Feb 14, 2025 · 0 comments
Open
2 of 4 tasks

Slider yields float values when not dragging handles beforehand #7257

justomio opened this issue Feb 14, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@justomio
Copy link

Describe the bug

The PrimeVue slider turns integer values into floats, even when configured (min, max, step) to only use integer. The issue occurs on both non-range and range sliders. It is reproducable on the primevue playground (see link or attached file). The issue only occurs, when the user clicks on the slider bar, without dragging the handle. The values will then stay floats, even when dragging the handle.

The issues does not occur, when the handle is dragged before clicking on the slider bar.

Bildschirmaufnahme.2025-02-14.um.15.02.46.mov

vitejs-vite-cwbnvkzy.zip

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/vitejs-vite-cwbnvkzy?file=src%2FApp.vue

Environment

Symfony 7.2 with VueJS.
But that doesn't seem relevant as this issue also occurs on the playground

Vue version

3.5.13

PrimeVue version

4.2.4

Node version

No response

Browser(s)

Chrome 133.0, Firefox 135.0, Safari 18.3

Steps to reproduce the behavior

  1. Add prime-slider component
  2. Click on the rendered slider (don't grab the handle!) with the slider handle jumping on the clicked position
  3. The slider values will become floats, even if you drag the handle afterwards

This issue doesn't occur, if you drag the handle beforehand!

Expected behavior

The values should stay integers, as long as the slider has been configured as such.

@justomio justomio added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 14, 2025
@justomio justomio changed the title Range slider yields float values when not dragging handles beforehand Slider yields float values when not dragging handles beforehand Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant