Skip to main content

When using createRow or Create New Row through the action framework with the table/first row in edit mode, the new row will not focus on a text field, even if it is the first or only field on the table. If you enable inline record creation, it does focus correctly. Changing the field type to number will focus on the field.


Simple example:
Sample Page:


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true"> <models> <model id="UIModel" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true"> <fields> <field id="Text Field" displaytype="TEXT" label="Text" ogdisplaytype="TEXT"/> <field id="Number" displaytype="DOUBLE" label="Number" ogdisplaytype="TEXT" precision="9" scale="0"/> </fields> <conditions/> <actions/> </model> </models> <components> <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="10" alwaysresetpagination="false" createrecords="true" model="UIModel" buttonposition="" mode="edit" allowcolumnreordering="false" responsive="false" uniqueid="sk-3LiIir-107" emptysearchbehavior="query"> <fields> <field id="Text Field" hideable="true" uniqueid="fi-3LiKW0-124"/> <field id="Number" hideable="true" uniqueid="fi-3LiKW0-125"/> </fields> <rowactions/> <massactions usefirstitemasdefault="true"/> <views> <view type="standard"/> </views> <actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true"> <action type="multi" label="Create New Row" icon="sk-icon-magic"> <actions> <action type="createRow" model="UIModel" appendorprepend="prepend" defaultmodefornewitems="edit" affectedrows="context"/> </actions> </action> </actions> </skootable> </components> <resources> <labels/> <javascript/> <css/> </resources> <styles> <styleitem type="background" bgtype="none"/> </styles> </skuidpage> 

This is with Skuid 10.0.1 - it was not a problem before upgrading from Rockaway.

Thank you for bringing this to our attention. I see the same behavior in 10.0.1. I’ll let you know when we have this issue resolved. 


Thanks for the update. I ended up using jquery in my snippet to force selection on the first element. 


$('#newCheckOutTable').find("input"))0].focus();<br>

Clever.

Thanks for posting that. It’s helpful for anyone who comes along after to see.


Reply