You need to sign in to do that
Don't have an account?
edukondalu thodeti
how to use toggle functionalities for a custom button in lightning component
i need to hide and show the result when i click on the same button twice using toggle functionalities.i need to show the result when i click on the button first time and when i click on the same button second time i need to hide the result. pls anyone help me i am new to the lightning
You can follow the below steps:
- Add your result component under the aura:if condition. Like this
-
- When you click on the button call a method from javascript controller and just reverse the value of this showResult property. Like this:
-
Let me know if you need any other help on this.Thanks,
Abhishek Bansal.
i wrote the code as below
the result should like these when i click on the button first time
and again when i click on the same button second time the result should look like these
pls help how to do these task
Since you need to bind this functionality with all the rows so you need to create a wrapper class for this. Please add a wrapper class in your controller class and bind one boolean variable with this button.
Make this boolean true/false based on its value.
Let me know if you need any further help on this. For any immediate assisstance, please contact me directly.
Thanks,
Abhishek Bansal.
Gmail: abhibansal2790@gmail.com
Skype: abhishek.bansal2790
Phone: +917357512102