@@ -34,10 +34,6 @@ var _isotopeLayout2 = _interopRequireDefault(_isotopeLayout);
3434
3535var _reactBootstrap = require ( 'react-bootstrap' ) ;
3636
37- var _jquery = require ( 'jquery' ) ;
38-
39- var _jquery2 = _interopRequireDefault ( _jquery ) ;
40-
4137function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
4238
4339function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
@@ -119,8 +115,6 @@ var IsotopeGrid = function (_React$Component) {
119115 _createClass ( IsotopeGrid , [ {
120116 key : 'createIsotope' ,
121117 value : function createIsotope ( ) {
122- var _this2 = this ;
123-
124118 var _props = this . props ,
125119 id = _props . id ,
126120 wholeWord = _props . wholeWord ,
@@ -137,9 +131,11 @@ var IsotopeGrid = function (_React$Component) {
137131 itemSelector : '.' + id + '-item' ,
138132 layoutMode : 'fitRows' ,
139133 filter : function filter ( itemElem ) {
140- var isoSearch = itemElem ? itemElem . querySelector ( '.isotope-search' ) : ( 0 , _jquery2 . default ) ( _this2 ) . find ( '.isotope-search' ) ;
134+ var _this2 = this ;
135+
136+ var isoSearch = itemElem ? itemElem . querySelector ( '.isotope-search' ) : this . querySelector ( '.isotope-search' ) ;
141137 return ( ! filterList || filterList . length === 0 || filterList . every ( function ( filter ) {
142- return filter ( itemElem || ( 0 , _jquery2 . default ) ( _this2 ) ) ;
138+ return filter ( itemElem || _this2 ) ;
143139 } ) ) && reg . test ( isoSearch ? isoSearch . innerText : '' ) ;
144140 }
145141 } )
@@ -156,8 +152,6 @@ var IsotopeGrid = function (_React$Component) {
156152 } , {
157153 key : 'componentWillReceiveProps' ,
158154 value : function componentWillReceiveProps ( nextProps ) {
159- var _this3 = this ;
160-
161155 var oldElems = [ ] ;
162156
163157 this . props . children . forEach ( function ( item ) {
@@ -186,9 +180,11 @@ var IsotopeGrid = function (_React$Component) {
186180 if ( this . props . searchTerm . toLowerCase ( ) . trim ( ) !== nextProps . searchTerm . toLowerCase ( ) . trim ( ) || JSON . stringify ( this . props . filterList ) !== JSON . stringify ( nextProps . filterList ) ) {
187181 var reg = nextProps . wholeWord ? RegExp ( '\\b' + nextProps . searchTerm . toLowerCase ( ) . trim ( ) + '\\b' , 'i' ) : RegExp ( '' + nextProps . searchTerm . toLowerCase ( ) . trim ( ) , 'i' ) ;
188182 options . filter = function ( itemElem ) {
189- var isoSearch = itemElem ? itemElem . querySelector ( '.isotope-search' ) : ( 0 , _jquery2 . default ) ( _this3 ) . find ( '.isotope-search' ) ;
183+ var _this3 = this ;
184+
185+ var isoSearch = itemElem ? itemElem . querySelector ( '.isotope-search' ) : this . querySelector ( '.isotope-search' ) ;
190186 return ( ! nextProps . filterList || nextProps . filterList . length === 0 || nextProps . filterList . every ( function ( filter ) {
191- return filter ( itemElem || ( 0 , _jquery2 . default ) ( _this3 ) ) ;
187+ return filter ( itemElem || _this3 ) ;
192188 } ) ) && reg . test ( isoSearch ? isoSearch . innerText : '' ) ;
193189 } ;
194190 }
0 commit comments