Table Global & Mass Actions not rendering in order specific when conditional rendering is involved

When Table Global/Mass Actions have conditional rendering applied, the order of the actions listed does not match the order specified in the builder (XML) as the conditions change.

Note - This is important when a specific action needs to be the “default/visible” one but it is not always available based on certain criteria.

Steps to reproduce:

  1. Create page using XML below
  2. Preview page
  3. Click the “select all” checkbox for the mass actions columns

Expected Behavior = Actual Behavior
Action 2 & 3 for both global & mass are rendered and in correct order

  1. Change the account name of any account

Expected Behavior
Actions should be rendered in order specified in builder (1, then 2, then 3)

Actual Behavior
Action 2 is listed first, followed by Action 1 then Action 3

Sample Page

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Account" limit="100" query="true" createrowifnonefound="false" sobject="Account">
         <fields>
            <field id="Name"/>
            <field id="CreatedDate"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
   </models>
   <components>
      <pagetitle model="Account" uniqueid="sk-deyd--68">
         <maintitle>
            <template>{{Model.labelPlural}}</template>
         </maintitle>
         <subtitle>
            <template>Home</template>
         </subtitle>
         <actions>
            <action type="savecancel"/>
         </actions>
      </pagetitle>
      <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Account" mode="edit" uniqueid="sk-deye0-69">
         <fields>
            <field id="Name" allowordering="true"/>
            <field id="CreatedDate" allowordering="true"/>
         </fields>
         <rowactions>
            <action type="edit"/>
            <action type="delete"/>
         </rowactions>
         <massactions usefirstitemasdefault="true">
            <action type="multi" label="Mass Action 1" icon="sk-icon-magic">
               <renderconditions logictype="and">
                  <rendercondition type="fieldvalue" enclosevalueinquotes="false" fieldmodel="Account" sourcetype="modelproperty" nosourcerowbehavior="deactivate" sourceproperty="hasChanged" value="true" operator="="/>
               </renderconditions>
            </action>
            <action type="multi" label="Mass Action 2" icon="sk-icon-magic"/>
            <action type="multi" label="Mass Action 3" icon="sk-icon-magic"/>
         </massactions>
         <views>
            <view type="standard"/>
         </views>
         <actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true">
            <action type="multi" label="Global Action 1" icon="sk-icon-magic">
               <renderconditions logictype="and">
                  <rendercondition type="fieldvalue" enclosevalueinquotes="false" fieldmodel="Account" sourcetype="modelproperty" nosourcerowbehavior="deactivate" sourceproperty="hasChanged" value="true" operator="="/>
               </renderconditions>
            </action>
            <action type="multi" label="Global Action 2" icon="sk-icon-magic">
               <renderconditions logictype="and"/>
            </action>
            <action type="multi" label="Global Action 3" icon="sk-icon-magic"/>
         </actions>
      </skootable>
   </components>
   <resources>
      <labels/>
      <css/>
      <javascript/>
   </resources>
   <styles>
      <styleitem type="background" bgtype="none"/>
   </styles>
</skuidpage>

Barry~

Thanks for reporting this bug. The devs are aware of it and will consider it for a future release. This post will be updated when a fix is available. 

Thanks!
Karen

Thanks Karen!