Fix some rendering-related problems with ListView and ListItemView.
Review Request #5718 — Created April 16, 2014 and submitted
ListView
was attaching to collection events ininitialize
and rendering
as a result. This meant that they could render beforerender()
was
called, causing breakages. Now, these events are attached inrender()
instead.
ListItemView
had some whitespace before the default displayed text,
which isn't ideal. This changes the template to not indent.
Unit tests in RBC that were failing before now pass.
Description | From | Last Updated |
---|---|---|
render() is allowed to be called multiple times without side effects. I think you should wrap this with a guard … |
david | |
There are an awful lot of blank lines for such a simple function. |
david | |
Is it really worth having a separate method for this? We only call it from render(). |
david |
- Change Summary:
-
Events are now only connected after the first render.
- Commit:
-
57af9f3d0ad72621a46f09abe8eebfe50dbd4f82eb56b996a897e75480ba364983a4fe37d58bf7a1
- Change Summary:
-
- Removed some blank lines and an unnecessary variable declaration, due to the recent
listenTo
move. - Added an
action-menu
class toListItemView
, which is needed to help with some lookup/CSS rendering issues.
- Removed some blank lines and an unnecessary variable declaration, due to the recent
- Commit:
-
eb56b996a897e75480ba364983a4fe37d58bf7a1fda56b7b69b11bfbae3fec1d0fb3b42a7e7646cb