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 disabling form controls via reactive forms; reset no longer marks as dirty #390

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hakla
Copy link

@hakla hakla commented Nov 28, 2024

Currently, it is not possible to disable the slider by disabling or enabling a form control through reactive forms (see #223). When changing the enabled state, the slider will appear to be disabled, but it actually isn't.

This pull request fixes that (fixes #223).

I've also added a fix so that the slider no longer emits changes to angular when they come from angular, i.e. when the value is updated by calling something like control.reset(0), the slider no longer calls the reactive forms callbacks for 'changed' and 'touched'. Previously, these would cause the controls to become dirty and touched again when the controls were reset (fixes #255).

@hakla hakla changed the title Fix disabling form controls via reactive forms (#223) Fix disabling form controls via reactive forms (#223), reset no longer marks as dirty (#255) Jan 21, 2025
@hakla hakla changed the title Fix disabling form controls via reactive forms (#223), reset no longer marks as dirty (#255) Fix disabling form controls via reactive forms; reset no longer marks as dirty Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

in Reactive form it is marking as dirty when it is supposed to be pristine Reactive form disable support
1 participant