-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Disable/enable form #13170
Comments
Is there a hack to fix this temporary? I think this is quite mandatory with the following use case:
Thanks in advance! |
I guess I could think of a couple of hacks to try for this particular use case:
Were it my app, I would probably start with number 1 and see how it went since keeping a list of controls around when using form builder is pretty easy to do. |
Unfortunately, option 1 is a no go, because it will have the same behavior as disableing/re-enableing the whole form. Option 2 and 3 are a bit too complex and requires more maintenance if you have multiple pages with the same form (pushed as parameter; form values must still be viewed). What’s your opinion about looping through the formgroup, check for the disabled state and manually add/remove it from the input fields? |
I have the same issue. Disabling individual controls does not work. I did a very ugly hack and removed the disabled attribute "manually" . |
Related issue https://github.com/ionic-team/ionic/issues/12359 Still the same behavior with ionic-angular 3.9.2 and angular 5. |
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. Thank you for using Ionic! |
Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[X] 3.x
[ ] 4.x
I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
Please do not submit support requests or "How to" questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Disableing a FormGroup or FormControl doesn't update the input fields immediately with a disabled attribute. This attribute will be added after the user clicks on that specific input field. However, after re-enableing the FormGroup or FormControl the disabled attribute doesn't get removed.
Expected behavior:
Disableing and re-enabling should toggle the disabled attribute immediately on all targeted input fields.
Steps to reproduce:
! Untouched input fields won't be affected !
Related code:
http://plnkr.co/edit/FIU9rnog5x7u6sCzNeef?p=preview
Other information:
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: