From 8d66742e5b5e7c77bebb1c17783bac550dfe29b1 Mon Sep 17 00:00:00 2001 From: "M. Peter" Date: Fri, 27 Jan 2017 11:29:51 +0100 Subject: [PATCH] fix: respect maxcount for array facet on mouse click --- _src/js/views/facets/subarray.coffee | 3 +++ _src/js/views/selector.coffee | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/_src/js/views/facets/subarray.coffee b/_src/js/views/facets/subarray.coffee index ad6b953..0658c5a 100644 --- a/_src/js/views/facets/subarray.coffee +++ b/_src/js/views/facets/subarray.coffee @@ -138,6 +138,9 @@ class FacetSubArray extends require( "../selector" ) select: => if @loading return + + if @_isFull() + return _vals = @model.get( "value" ) if _vals? and not _.isArray( _vals ) diff --git a/_src/js/views/selector.coffee b/_src/js/views/selector.coffee index 10e051e..b11582b 100644 --- a/_src/js/views/selector.coffee +++ b/_src/js/views/selector.coffee @@ -129,6 +129,10 @@ class SelectorView extends require( "./facets/base" ) return selected: ( mdl )=> + if not @main? and @_isFull() + _id = @result.last()?.id + @rmRes( _id ) + try if mdl.onlyExec? mdl?.exec?()