0

I have a CollectionView that has :

  • a tagName set to tbody ( so its children are 'tr' )
  • an emptyView.

The problem is: the emptyView is never hidden.

See this fiddle : http://jsfiddle.net/EHQLF/

So my questions are :

  1. Why is the emptyView still here after click on "add"
  2. Why does it works if I remove the tagName
  3. I want the render of the emptyView to look like this:

<table><tr><td colspan="2">The collection is empty</td></tr></table>

What is the proper way to do that ?

louiscoquio
  • 10,638
  • 3
  • 33
  • 51

1 Answers1

1

I found the solution. It works if the emptyView template start with td.

The emptyView is automatically tagged tr ( see CollectionView.arrayDidChange() and below CollectionView.createChildView).

See this fiddle : http://jsfiddle.net/EHQLF/1/

I'm still interested for any other solution !

louiscoquio
  • 10,638
  • 3
  • 33
  • 51