You need to sign in to do that
Don't have an account?
Amit Singh 2236
Lightning input password component eye icon to show or hide password logic with caps Lock functionality
Lightning input password component eye icon to show or hide password logic with caps Lock functionality
I have understood your requirement and got a solution, please find it below-
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com
All Answers
I have understood your requirement and got a solution, please find it below-
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com
Greetings to you!
According to the Salesforce doc: https://developer.salesforce.com/docs/component-library/bundle/ui:inputSecret/example
ui:inputSecret has been deprecated. Use lightning:input with password type instead.
In instances where there are matching ui and lightning namespace components, Salesforce recommends that you use the lightning namespace component. The lightning namespace components are optimized for common use cases. Beyond being equipped with the Lightning Design System styling, they handle accessibility, real-time interaction, and enhanced error messages.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/lightning_overview.htm
Please use lightning:input as suggested by Ajay.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
If you want to use UI:inputSecret instead of UI: input you will not be able to show the password text because UI:inputSecret does not allow to show the input text.
If you want to eye view to show or hide the password field you should use UI: input and then use a JS to show or hide the password filed.
"A UI:inputSecret component represents a password field, which is rendered as an HTML input tag of type password. To apply Lightning Design System styling, we recommend that you use lightning: input with type="password" instead of ui:inputSecret."
Refer this think-
https://developer.salesforce.com/docs/component-library/bundle/ui:inputSecret/documentation
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com