forked from walters954/why-salesforce
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Keep Tabs Sorted
Alfredo edited this page Aug 14, 2025
·
7 revisions
By enabling this setting, you'll be prompted to pick by which field your favourite Tabs should be sorted and in which order. You may sort your Tabs as follows:
- By Label ascending;
- By Label descending;
- By URL ascending;
- By URL descending;
- By Org ascending;
- By Org descending;
By default, your Tab list is unsorted (unless you manually sort it).
Everything is dealt with by the TabContainer class.
While sorting is relatively easy (see sort function on the linked file), keeping the Tabs sorted at all times is al little bit more involved since we have to ensure to keep them sorted only if the user wants them to be and with the paramethers set by them. The 2 functions checkSetSorted and checkShouldKeepSorted were created to help overcome this particular issue every time before the array has to be synced.