csantanapr / dapp-examples

Series of Single Page Apps using the dApp Framework
http://csantanapr.github.io/dapp-examples
Other
5 stars 4 forks source link

Use event delegation for li on list of request for event click on Request List View #5

Open csantanapr opened 11 years ago

csantanapr commented 11 years ago

Instead of using itemRenderer to create a ListItemand attache a click listener on every li, we should use event delegation. We should one event listener and then delegate with an optimize selector for matching when li is clicked.

The event listener can be put on the (ul), (view), or document. we need to investigate which one has the best trade off between performance and maintainability (i.e. easy to read the code)

csantanapr commented 11 years ago

Going to use itemRedered for now to transition the code from Ed's repo to this one,a nd the optimized for performance

csantanapr commented 11 years ago

I understand that I can put a click on the ul, but then I need to right custom js code to run the listItem._onClick function to get default click behavior on ListITem widget