Skip to content

Commit

Permalink
LPS-95937 Safeguard the active status in init
Browse files Browse the repository at this point in the history
  • Loading branch information
boton authored and brianchandotcom committed May 23, 2019
1 parent 878fd08 commit 158c9be
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,23 @@ class ManagementToolbar extends ClayComponent {
this._searchContainer = searchContainer;

const select = searchContainer.select;
const bulkSelection = this.supportsBulkActions && select.get('bulkSelection');

this._setActiveStatus(
{
allSelectedElements: select.getAllSelectedElements(),
currentPageElements: select.getCurrentPageElements(),
currentPageSelectedElements: select.getCurrentPageSelectedElements()
},
bulkSelection
);
if (
select.getAllSelectedElements &&
select.getCurrentPageElements &&
select.getCurrentPageSelectedElements
) {
const bulkSelection = this.supportsBulkActions && select.get('bulkSelection');

this._setActiveStatus(
{
allSelectedElements: select.getAllSelectedElements(),
currentPageElements: select.getCurrentPageElements(),
currentPageSelectedElements: select.getCurrentPageSelectedElements()
},
bulkSelection
);
}
}
);

Expand Down

0 comments on commit 158c9be

Please sign in to comment.