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

p-slider: Range slider with a step has the middle bar lag behind by one update #11749

Closed
Phil-DS opened this issue Jul 27, 2022 · 3 comments · Fixed by #11833
Closed

p-slider: Range slider with a step has the middle bar lag behind by one update #11749

Phil-DS opened this issue Jul 27, 2022 · 3 comments · Fixed by #11833
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Phil-DS
Copy link

Phil-DS commented Jul 27, 2022

Describe the bug

The range bar, with a step size, breaks on clicking the bar. ONLY with a step size set. Not a range: fine. Default step size: fine.

Environment

Standard angular setup. Bug reproducible in stackblitz (See the stackblitz)

Reproducer

https://stackblitz.com/edit/github-ubq5gm?file=README.md

Angular version

14.0.7

PrimeNG version

14.0.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.13.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Have a range slider, with a step size
  2. click on the bar to move the handle to the latest point
  3. notice the bar didn't change
  4. click on the bar again
  5. notice the handle moved to the new location, but the blue bar now reflects the prior positions.

Expected behavior

The center bar follows the handles correctly.

@Phil-DS Phil-DS added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jul 27, 2022
@Phil-DS
Copy link
Author

Phil-DS commented Jul 27, 2022

Seems to break with using the arrow keys as well, in the similar manner. Always 1 frame behind

@Phil-DS Phil-DS changed the title p-slider: Range slider with a step doesn't follow on bar click p-slider: Range slider with a step has the middle bar lag behind by one update Jul 28, 2022
@Phil-DS
Copy link
Author

Phil-DS commented Aug 2, 2022

I think I see the issue. In a lot of the cases, updateValue triggers before updateHandleValue. Triggering them in this order sets the center bar's values first, before updating the values for the handles, therefore, lagging behind by 1 update.

@Adask023
Copy link
Contributor

Hello, i'll try to fix that issue.

This was referenced Aug 11, 2022
@cetincakiroglu cetincakiroglu added this to the 14.0.3 milestone Sep 9, 2022
@cetincakiroglu cetincakiroglu linked a pull request Sep 9, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants