<div ng-click="grid.api.selection.getSelectedRows().length > 0 ? grid.api.selection.clearSelectedRows() : grid.api.selection.selectAllRows($event)" ng-if="grid.options.enableSelectAll">
    <div class="ui-grid-cell-contents" col-index="renderIndex" style="text-align:center">
        <div class="ng-scope fas fa-check ui-grid-selection-row-header-buttons"ng-class="{'ui-grid-all-selected': grid.selection.selectAll}"></div>
    </div>
</div>