Uncaught TypeError: Cannot read property 'find' of undefined on row action update where table uses "Hide Footer"

  • 1
  • Problem
  • Updated 2 months ago
  • Solved
This is a simple list of Users in a table with Hide Footer turned on. The model has a UI-only checkbox field, and there is a pair of row actions that toggle the field on and off.

When you first click the Toggle On action, nothing happens. Check the browser (Chrome) console (Ctrl+Shift+i) and you will see the javascript error "Uncaught TypeError: Cannot read property 'find' of undefined"

To prevent the error, unselect the Hide Footer option on the table.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" theme="Lightning Design">
    <models>
        <model id="Users" query="true" createrowifnonefound="false" sobject="User" orderby="Name" datasource="salesforce">
            <fields>
                <field id="Name"/>
                <field id="UI_Field" uionly="true" displaytype="BOOLEAN" label="UI Field" ogdisplaytype="TEXT"/>
            </fields>
            <conditions/>
            <actions/>
            <groupby method="simple"/>
        </model>
    </models>
    <components>
        <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" hideheader="true" hidefooter="false" pagesize="10" alwaysresetpagination="false" createrecords="false" model="Users" mode="readonly" allowcolumnreordering="false" responsive="true" uniqueid="sk-2O7U-274">
            <fields>
                <field id="Name" hideable="true" uniqueid="fi-2JqX-352"/>
                <field id="UI_Field" hideable="true" uniqueid="fi-2hu5-436"/>
            </fields>
            <rowactions>
                <action type="multi" label="Toggle on" icon="sk-icon-magic">
                    <actions>
                        <action type="updateRow" fieldmodel="Users" affectedrows="context" field="UI_Field" enclosevalueinquotes="false" value="true"/>
                    </actions>
                    <renderconditions logictype="and"/>
                </action>
                <action type="multi" label="Toggle off" icon="sk-icon-magic">
                    <actions>
                        <action type="updateRow" fieldmodel="Users" affectedrows="context" field="UI_Field" enclosevalueinquotes="true" value="false"/>
                    </actions>
                </action>
            </rowactions>
            <massactions usefirstitemasdefault="true"/>
            <views>
                <view type="standard"/>
            </views>
            <searchfields/>
        </skootable>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
        <actionsequences uniqueid="sk--mD-659"/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>


Could I please have the last two days back?
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
  • burnt out

Posted 3 months ago

  • 1
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Mike,

I installed your page in my developer org and it works without error (whether the footer is showing or not).  I am on 11.2.8 (latest version of Skuid).

What version are you running?

Thanks,

Bill

Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
11.1.14
I guess we'll just have to display the footers until we upgrade. Or use CSS to hide them if necessary.

Thanks!