This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Ivor van Rensburg
Posted Nov 19 - Read on Facebook

Hi All,
I'm trying to prototype a list based UI off an array, but I can't for some reason register a click of the item I'm clicking. Firstly every click prints out the last row, and secondly would you do it this way or is there a simpler way? The example is


George Kedenburg III

dont use 'cb' in your click event, use 'this' or '@'

Jordan Robert Dobson

You only have one CB in memory. You just keep adding a new layer to CB over and over. By the time you click it's the last layer.

One thing you could do is make your CB part of the the single row.

singleRow.cb = new Layer
width: 14, height:14

singleRow.on Events.Click, ->

Ivor van Rensburg

I've updated it to Jordan Robert Dobson solution, which fixes the lag issue, however still prints out the last row George Kedenburg III Your solution didn't seem to work in this instance I'm afraid

Jordan Robert Dobson

George Kedenburg III he has two layers he's working with. @ works but he's trying to access the checkbox layer created when the row is clicked. You're simplifying too much brah

Read the entire post on Facebook