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

fix(material/slider): handle null and undefined values in slider input #30621

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mistrykaran91
Copy link
Contributor

The slider values behaved inconsistently when we reset the formGroup. This MR will resolve that issue by setting value to default value when its undefined or null

Fixes #30614

@mistrykaran91 mistrykaran91 requested a review from a team as a code owner March 12, 2025 10:58
@mistrykaran91 mistrykaran91 requested review from crisbeto and wagnermaciel and removed request for a team March 12, 2025 10:58
@mistrykaran91 mistrykaran91 force-pushed the bugfix/inconsistent-reset-behavior-for-mat-slider branch 2 times, most recently from 25d2edf to 77aabff Compare March 12, 2025 11:54
@mistrykaran91 mistrykaran91 marked this pull request as draft March 12, 2025 12:08
Copy link

@kenyerman kenyerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for working on this! ❤️
i've found some falsyness checks that can be improved, please review them and correct me if i'm wrong.

@mistrykaran91 mistrykaran91 force-pushed the bugfix/inconsistent-reset-behavior-for-mat-slider branch 2 times, most recently from a395a58 to 4cc752d Compare March 12, 2025 12:39
The slider values behaved inconsistently when we reset the formGroup. This MR will resolve that issue by setting `value` to default value when its `undefined` or `null`

Fixes angular#30614
@mistrykaran91 mistrykaran91 force-pushed the bugfix/inconsistent-reset-behavior-for-mat-slider branch from 4cc752d to 4c1afd6 Compare March 12, 2025 12:54
@wagnermaciel wagnermaciel self-assigned this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(MatSlider): Inconsistent Reset Behavior for mat-slider with Range Thumbs in Reactive Forms
3 participants