-
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
readonly attribute not rendering on ion-input tags #6408
Comments
Here's the related forum topic: https://forum.ionicframework.com/t/conditional-readonly-on-ion-input/50855. |
+1 |
Any news on this? |
Would like to know when this is going to be fixed as well? |
I would also like to know when this is going to be fixed as well, |
Any improvements? |
Even if it did, there's issues in RC4 apparently you can workaround it using custom validators |
Ideas for workarounds? |
would be great to get this fixed. |
Actually, looks like an oversight. In ionic-angular components/input/ it does not have any code to pass the readonly attribute back to the native angular element. I was able to add that code easily by just duplicating the logic/functions for the disabled attribute. Attached is diff in case it helps anyone get by for now. |
I want to revisit all the inputs before ionic 2.0 final is released: |
Any forecast of when it will be fixed? |
Any estimate of a fix? Just Stuck with it! |
Any update on this? I have the same issue. The "disabled" tag which I am guessing should act the same as readonly is not working.
|
also adds to placeholder test an input and textarea with readonly that can be toggled fixes #6408
@tonyawad88 Can you take a look at my comment here: #10095 (comment)
For this issue, submitted a PR here: #10120 |
also adds to placeholder test an input and textarea with readonly that can be toggled fixes #6408
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. 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. |
Short description of the problem:
When conditionally applying the 'readonly' attribute to an ion-input, by using the Angular2 syntax [readonly]="variable", the ion-input tag does not apply the attribute to the rendered 'input' tag.
What behavior are you expecting?
Expect the 'readonly' attribute to be rendered on the input tag when "variable" is set to true.
Steps to reproduce:
<ion-input [readonly]="isReadonly">
Which Ionic Version? 2.x
Plunker that shows an example of your issue
http://plnkr.co/edit/xKfiA5wR0aoYsm1n6nxe?p=preview
Run
ionic info
from terminal/cmd prompt:Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X Yosemite
Node Version: v4.4.2
Xcode version: Xcode 7.0 Build version 7A220
The text was updated successfully, but these errors were encountered: