@@ -32,6 +32,8 @@ var _isotopeLayout = require('isotope-layout');
3232
3333var _isotopeLayout2 = _interopRequireDefault ( _isotopeLayout ) ;
3434
35+ var _reactRedux = require ( 'react-redux' ) ;
36+
3537var _reactBootstrap = require ( 'react-bootstrap' ) ;
3638
3739function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
@@ -177,7 +179,7 @@ var IsotopeGrid = function (_React$Component) {
177179 } ) ;
178180 var reload = oldElems . length !== newElems . length ;
179181 var options = { } ;
180- if ( this . props . searchTerm . toLowerCase ( ) . trim ( ) !== nextProps . searchTerm . toLowerCase ( ) . trim ( ) || JSON . stringify ( this . props . filterList ) !== JSON . stringify ( nextProps . filterList ) ) {
182+ if ( this . props . searchTerm . toLowerCase ( ) . trim ( ) !== nextProps . searchTerm . toLowerCase ( ) . trim ( ) || JSON . stringify ( this . props . filterList ) !== JSON . stringify ( nextProps . filterList ) || JSON . stringify ( this . props . category ) !== JSON . stringify ( nextProps . category ) ) {
181183 var reg = nextProps . wholeWord ? RegExp ( '\\b' + nextProps . searchTerm . toLowerCase ( ) . trim ( ) + '\\b' , 'i' ) : RegExp ( '' + nextProps . searchTerm . toLowerCase ( ) . trim ( ) , 'i' ) ;
182184 options . filter = function ( itemElem ) {
183185 var _this3 = this ;
@@ -312,7 +314,8 @@ IsotopeGrid.propTypes = {
312314 sortOrder : _propTypes2 . default . string ,
313315 searchTerm : _propTypes2 . default . string ,
314316 wholeWord : _propTypes2 . default . bool ,
315- filterList : _propTypes2 . default . arrayOf ( _propTypes2 . default . func )
317+ filterList : _propTypes2 . default . arrayOf ( _propTypes2 . default . func ) ,
318+ category : _propTypes2 . default . object
316319} ;
317320
318321IsotopeGrid . defaultProps = {
@@ -324,4 +327,8 @@ IsotopeGrid.defaultProps = {
324327
325328IsotopeGrid . Item = IsotopeItem ;
326329
327- exports . default = IsotopeGrid ;
330+ exports . default = ( 0 , _reactRedux . connect ) ( function ( state ) {
331+ return {
332+ category : state . visibilityFilter && state . visibilityFilter . category
333+ } ;
334+ } ) ( IsotopeGrid ) ;
0 commit comments