Cool Spry Tip

I missed this from two versions ago or so, but Spry has a new attribute to make master/detail work a bit easier. In the past, you would typically use code like this to display a set of data and allow a user to click to load a detail region:

<tr spry:repeat="mydata" onclick="mydata.setCurrentRow('{ds_RowID}');">

Notice the onclick? This tells Spry to update the current selected row. This is now done like so:

<tr spry:repeat="mydata" spry:setrow="mydata">

Love it. One more line of JavaScript removed.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for Extend by Auth0. He focuses on serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support.

Lafayette, LA