CollectionView#insertView does not call the filter callback #210

molily opened this Issue Oct 2, 2012 · 1 comment


None yet

2 participants

molily commented Oct 2, 2012

CollectionView#filter accepts a callback which might override the default filtering behavior (hiding the view). But insertView doesn’t use this callback, it directly hides it:

if included
  # Hide the view if it’s filtered
  $viewEl.css 'display', 'none'

So the whole idea is sabotaged…

Background: We’re using filtering for just marking an element with an enable/disable class. At the moment we have to override insertView.

molily commented Oct 2, 2012

The filter callback could be a normal method like filterer, then it can be used automatically in insertView, just like filterer is used. There’s no need to call @filter() explicitly at the moment, declaring a filterer method is enough. Same should apply for the filter callback.

@paulmillr paulmillr closed this in 308fb03 Oct 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment