Posted: 19 May 2020 14:04 EDT Last activity: 4 Jun 2020 9:51 EDT
Highlight menu on load
I am using Navigation rule with Icon toolbar format to display my menu option. With each click on the menu tabs, one specific Harness is loaded on the UI. When I click on the menu icon, that particular menu options gets highlighted. My issue is that the menu option is not getting highlighted when loaded at the very first time. I have tried active when condition on navigation rule as well, did not work. When UI portal loads for the first time, a Harness corresponding to one of the menu option is loaded.
***Edited by Moderator Marissa to update Platform Capability tags****
This seems to be default behavior even for the OOTB Case Manager portal. The following less complex script seems to work when added to UserWorkForm to get the desired behavior in the OOTB Case Manager portal as well. You can try this if any issues with the above suggestions.
Is there any difference if you put the script in UserWorkForm instead of the section's HTML?
Since it sounds like this may be in your own section, please right click the menu item in question, inspect element and either take a screenshot or copy and paste the markup. Try to include the li element, parent ul element, and parent div element.
My guess is that we may need to modify the script to better suit what we see in your scenario.
If this doesn't work, you can try other classes in the parent element to see if it works. However, I'd recommend trying to choose a class that seems specific to this menu so that you don't inadvertently cause issues in other spots in the application.