diff --git a/src/Column/Type/ActionsColumnType.php b/src/Column/Type/ActionsColumnType.php index a103e75a..9db45d46 100755 --- a/src/Column/Type/ActionsColumnType.php +++ b/src/Column/Type/ActionsColumnType.php @@ -39,6 +39,7 @@ public function configureOptions(OptionsResolver $resolver): void 'export' => false, 'property_path' => false, 'actions' => [], + 'priority' => -1, ]) ->setNormalizer('actions', function (Options $options, mixed $value) { ($resolver = new OptionsResolver()) diff --git a/src/DataTableBuilder.php b/src/DataTableBuilder.php index de5717b8..bb2bfbe9 100755 --- a/src/DataTableBuilder.php +++ b/src/DataTableBuilder.php @@ -918,7 +918,6 @@ private function prependBatchCheckboxColumn(): void private function appendActionsColumn(): void { $this->addColumn(self::ACTIONS_COLUMN_NAME, ActionsColumnType::class, [ - 'priority' => self::ACTIONS_COLUMN_PRIORITY, 'actions' => $this->getRowActions(), ]); } diff --git a/src/DataTableBuilderInterface.php b/src/DataTableBuilderInterface.php index 65769139..803bde4f 100755 --- a/src/DataTableBuilderInterface.php +++ b/src/DataTableBuilderInterface.php @@ -7,6 +7,7 @@ use Kreyu\Bundle\DataTableBundle\Action\ActionBuilderInterface; use Kreyu\Bundle\DataTableBundle\Action\Type\ActionTypeInterface; use Kreyu\Bundle\DataTableBundle\Column\ColumnBuilderInterface; +use Kreyu\Bundle\DataTableBundle\Column\Type\ActionsColumnType; use Kreyu\Bundle\DataTableBundle\Column\Type\ColumnTypeInterface; use Kreyu\Bundle\DataTableBundle\Exception\InvalidArgumentException; use Kreyu\Bundle\DataTableBundle\Exporter\ExporterBuilderInterface; @@ -23,6 +24,9 @@ interface DataTableBuilderInterface extends DataTableConfigBuilderInterface public const ACTIONS_COLUMN_NAME = '__actions'; + /** + * @deprecated since 0.19.1, the default actions column priority is now set in the type class {@see ActionsColumnType::configureOptions()} + */ public const ACTIONS_COLUMN_PRIORITY = -1; public const SEARCH_FILTER_NAME = '__search';