You need to sign in to do that
Don't have an account?
VSK98
Custom logout functionality not working lightning
Hi All,
I have to build custom logout functionality when the user clicks on the toggle button.
I have tried with lightning:buttonmenu but when the user clicks on toggle button the username disappears.
Snippet below:
Username Disappear:
Regards,
VSK98
I have to build custom logout functionality when the user clicks on the toggle button.
I have tried with lightning:buttonmenu but when the user clicks on toggle button the username disappears.
Snippet below:
<p class="slds-page-header__title slds-m-right_small slds-align-middle slds-truncate" title="test" style="color:white">TEST <span ><div class="slds-float_right"> {!v.userInfo.Name} <lightning:buttonMenu aura:id="menu" onselect="{! c.handleSelect }" alternativeText="Show menu"> <lightning:menuItem value="Logout" label="Logout" /> </lightning:buttonMenu></div></span></p>Controller:
handleSelect: function (cmp, event, helper) { // var selectedMenuItemValue = event.getParam("value"); window.location.href= 'https://test.salesforce.com'; }Actual Page:
Username Disappear:
Regards,
VSK98
Hi VSK98,
Please add this snippet , I hope It will work.
Regards,
Praveen Rai
I have used your snipped code, unfortunately, there is an issue in alignment. Later I have done some changes now its working fine.
Thanks for your response :)
My Snippet:
Regards,
VSK98