aslagle / reactive-table

A reactive table designed for Meteor
https://atmospherejs.com/aslagle/reactive-table
Other
328 stars 138 forks source link

some "Spacebars cells" disappear #450

Open guillim opened 7 years ago

guillim commented 7 years ago

It is a strange problem. I have a Reactive-table with 3 columns working fine. those 3 columns only display simple collection attributes. However, my last column is a bit more complicated and requires Spacebars (see bellow). Strange enough, when i launch the page some of the cells disappear after 1second. Even more strange, Those cells re-appear when i go to page 2 of my table, and then back to page 1.

Any idea why it behaves like that ?

Here is the code describing the cell that causes problem: return new Spacebars.SafeString("<button id="+id+" >Buy<i class='fa fa-shopping-cart' aria-hidden='true'></i></button>"); Note: id is an attribute part of my collection

Here is what is looks like after 1 second: screen shot 2016-12-30 at 12 54 47

and here is what it looks like -before some cells disappear -when i go to page 2 and go back to page 1 screen shot 2016-12-30 at 12 56 19

aslagle commented 7 years ago

That is strange, I don't know what the problem could be.

guillim commented 7 years ago

I found out on new thing. When i remove the "id" from the Spacebars.SafeString then it works fine. So my guess is that at some point SpaceBars reactivity creates a problem when it is launched from within a helper