diff --git a/page/search/common/group-by-mixin.js b/page/search/common/group-by-mixin.js index 317f96be1..76110f3ac 100644 --- a/page/search/common/group-by-mixin.js +++ b/page/search/common/group-by-mixin.js @@ -13,7 +13,17 @@ let ListSelection = require('../../../list/selection').list.component; // Mixins let i18nMixin = require('../../../common/i18n/mixin'); - +//Empty Result component to be mututalized. +let EmptyComponent = React.createClass({ + mixins: [i18nMixin], + render(){ + return ( +
+ {this.i18n('search.empty')} +
+ ); + } +}) /** * Mixin used in order to create a block. * @type {Object} @@ -31,11 +41,7 @@ let GroupByMixin = { lineComponentMapper() { throw new ArgumentNullException('Please provide a inferLineComponentFromList(list) function.'); }, - emptyComponent: ( -
- {this.i18n('search.empty')} -
- ) + emptyComponent: EmptyComponent }); }, /** @@ -78,7 +84,7 @@ let GroupByMixin = { }, _getSingleTypeResultList(groupKey, list, maxRows) { if (list.length === 0) { - return this.emptyComponent; + return ; } if (maxRows) { list = list.slice(0, maxRows);