/** * @param array $filters * @return DataGrid */ protected function setFilters(array $filters) { Helpers::recursiveKSort($filters); if ($diff = $this->filters !== $filters) { $this->filters = $filters; } $this->redraw(TRUE, TRUE, ['header-sort', 'filter-controls', 'body', 'footer']); $this->handlePaginate(1, FALSE); return $this; }
/** * @param array $filters * @param bool $refresh * @return DataGrid */ protected function setFilters(array $filters, $refresh = TRUE) { Helpers::recursiveKSort($filters); ($diff = $this->filters !== $filters) && (($this->filters = $filters) || TRUE); $refresh && $this->refreshState($diff) && $diff && ($this->redraw(TRUE, TRUE, 'header-sort', 'filter-controls', 'body', 'footer') || TRUE) && $this->handlePaginate(1, FALSE); return $this; }