@@ -71,6 +71,8 @@ class ActionsFilterContainer extends Component {
7171 icons : PropTypes . object ,
7272 /** Object of custom react-select styles */
7373 selectStyles : PropTypes . object ,
74+ /** Show item count if we are using data **/
75+ showItemCount : PropTypes . bool ,
7476 }
7577
7678 static defaultProps = {
@@ -81,6 +83,7 @@ class ActionsFilterContainer extends Component {
8183 columns : [ ] ,
8284 status : STATUS_CHOICES . done ,
8385 selectStyles : { } ,
86+ showItemCount : true ,
8487 }
8588
8689 state = {
@@ -110,7 +113,7 @@ class ActionsFilterContainer extends Component {
110113 filters, updateFilter, removeFilter, status,
111114 updateColumns, loadFavourite, handleAddFavourite,
112115 selectedFavouriteName, handleDeleteFavourite, favourites,
113- selectStyles,
116+ selectStyles, showItemCount ,
114117 } = this . props
115118 const loading = status === STATUS_CHOICES . loading
116119 let search
@@ -141,7 +144,7 @@ class ActionsFilterContainer extends Component {
141144 < SelectFilters
142145 filters = { filters . filter ( f =>
143146 ( ! search || f . filterKey !== searchKey ) && // remove search filter
144- ( ( f . permanent !== undefined && ! f . permanent ) || ( f . permanent === undefined && ! f . Renderer . defaultProps . permanent ) ) // remove filters to display permanently
147+ ( ( f . permanent !== undefined && ! f . permanent ) || ( f . permanent === undefined && ( ! f . Renderer || ! f . Renderer . defaultProps . permanent ) ) ) // remove filters to display permanently
145148 ) }
146149 addFilter = { this . props . addFilter }
147150 selectStyles = { selectStyles }
@@ -170,11 +173,13 @@ class ActionsFilterContainer extends Component {
170173 { /* TODO: render children below filters */ }
171174 < div className = "objectlist-row objectlist-row__actions" >
172175 < div className = "objectlist-column" >
173- < span className = "objectlist-results-text" >
174- { loading ? `Loading ${ itemPluralName } ...` : (
175- `${ totalCount ? totalCount . toLocaleString ( ) : 'No' } ${ totalCount === 1 ? itemSingleName : itemPluralName } found`
176- ) }
177- </ span >
176+ { showItemCount && (
177+ < span className = "objectlist-results-text" >
178+ { loading ? `Loading ${ itemPluralName } ...` : (
179+ `${ totalCount ? totalCount . toLocaleString ( ) : 'No' } ${ totalCount === 1 ? itemSingleName : itemPluralName } found`
180+ ) }
181+ </ span >
182+ ) }
178183 { customActions [ 0 ] && customActions [ 0 ] ( {
179184 selection,
180185 itemCount,
0 commit comments