diff --git a/src/DataTable.php b/src/DataTable.php index bc2d9f48..e7fd7b6c 100755 --- a/src/DataTable.php +++ b/src/DataTable.php @@ -871,7 +871,12 @@ private function getInitialFiltrationData(): ?FiltrationData $data = $this->getPersistenceData(PersistenceContext::Filtration); } - return $data ?? $this->config->getDefaultFiltrationData(); + $data ??= $this->config->getDefaultFiltrationData(); + + $data ??= FiltrationData::fromDataTable($this); + $data->appendMissingFilters($this->getFilters()); + + return $data; } private function getInitialPersonalizationData(): ?PersonalizationData @@ -886,7 +891,7 @@ private function getInitialPersonalizationData(): ?PersonalizationData $data = $this->getPersistenceData(PersistenceContext::Personalization); } - return $data ?? $this->config->getDefaultPersonalizationData(); + return $data ?? $this->config->getDefaultPersonalizationData() ?? PersonalizationData::fromDataTable($this); } private function isPersistenceEnabled(PersistenceContext $context): bool