diff --git a/CHANGELOG.md b/CHANGELOG.md index e39ad59..02eb230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Laravel DataTables Buttons Plugin CHANGELOG. +## v12.2.1 - 2025-10-01 + +- fix: defaults override via options #200 + ## v12.2.0 - 2025-10-01 - feat: improve html builder #199 diff --git a/src/Html/DataTableHtml.php b/src/Html/DataTableHtml.php index db73253..d107bdc 100644 --- a/src/Html/DataTableHtml.php +++ b/src/Html/DataTableHtml.php @@ -44,6 +44,13 @@ protected function getHtmlBuilder(): Builder $this->htmlBuilder = app(Builder::class); + $this->htmlBuilder + ->postAjax($this->ajax()) + ->setTableId($this->tableId) + ->selectSelector() + ->selectStyleOs() + ->addScript('datatables::functions.batch_remove'); + $this->options($this->htmlBuilder); if ($this->buttons()) { @@ -63,12 +70,7 @@ protected function getHtmlBuilder(): Builder public function handle(): Builder { - return $this->getHtmlBuilder() - ->setTableId($this->tableId) - ->selectSelector() - ->selectStyleOs() - ->postAjax($this->ajax()) - ->addScript('datatables::functions.batch_remove'); + return $this->getHtmlBuilder(); } public function setHtmlBuilder(Builder $builder): static