mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-23 01:03:21 +00:00
Filtering between selector lists
This commit is contained in:
@@ -25,6 +25,9 @@ Darkswarm.directive "filterSelector", (FilterSelectorsService)->
|
||||
scope.$on 'loadFilterSelectors', ->
|
||||
scope.allSelectors = scope.selectors()
|
||||
|
||||
scope.$watchCollection "selectors()", (newValue, oldValue) ->
|
||||
scope.allSelectors = scope.selectors()
|
||||
|
||||
# Build a list of selectors
|
||||
scope.selectors = ->
|
||||
# Generate a selector for each object.
|
||||
|
||||
@@ -62,8 +62,8 @@ Darkswarm.directive 'singleLineSelectors', ($timeout, $filter) ->
|
||||
if scope.allSelectors?
|
||||
scope.fitting = true
|
||||
selector.fits = true for selector in scope.allSelectors
|
||||
loadWidths()
|
||||
fit()
|
||||
$timeout(loadWidths, 0, true).then ->
|
||||
$timeout fit, 0, true
|
||||
|
||||
$(window).resize debouncer (e) ->
|
||||
scope.fitting = true
|
||||
|
||||
Reference in New Issue
Block a user