meteor-tabular icon indicating copy to clipboard operation
meteor-tabular copied to clipboard

Templates specified by tmpl not being destroyed when row removed

Open lynchem opened this issue 7 years ago • 1 comments

When a tabular is destroyed it will only destroy the tmpl's that are still present in the view but if a row is removed from your tabular it's template(s) will not be destroyed as it's no longer in the view. This is very simple to repro:

  1. Add a simple template to your tabular data.
  2. Put a breakpoint or console.log in the Template.onDestroyed.
  3. Add a record to your collection so you have 1 item being displayed.
  4. Navigate away from your view and notice onDestroyed is called once.
  5. Go back to view your tabular. Now delete the record from your collection. Notice onDestroyed is not called.
  6. Navigate away from your view and notice onDestroyed is still not called.

lynchem avatar Nov 10 '17 11:11 lynchem

Yes, we confirm that it also happens to us.

ixdi avatar Nov 15 '17 09:11 ixdi