From 338d76a2f3cb5e77da1c27f46311bc2fc0579d9c Mon Sep 17 00:00:00 2001 From: Arjay Angeles Date: Tue, 30 Sep 2025 14:09:21 +0800 Subject: [PATCH] fix: types error changed: ordering should be called manually --- phpstan.neon.dist | 1 + src/Html/Options/Plugins/ColumnControl.php | 3 +-- tests/Html/Extensions/ColumnControlTest.php | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 23d24cc..ec46799 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -15,6 +15,7 @@ parameters: - identifier: binaryOp.invalid - identifier: return.type - identifier: argument.type + - identifier: offsetAccess.nonOffsetAccessible excludePaths: - ./src/Html/Fluent.php diff --git a/src/Html/Options/Plugins/ColumnControl.php b/src/Html/Options/Plugins/ColumnControl.php index 1f3030c..f67bb0c 100644 --- a/src/Html/Options/Plugins/ColumnControl.php +++ b/src/Html/Options/Plugins/ColumnControl.php @@ -77,8 +77,7 @@ public function columnControlFooterSearch(array $content = []): static public function columnControlSearchDropdown(int|string $target = 0): static { - $this->addColumnControl($target, ['order', 'searchDropdown']) - ->ordering(['indicators' => false, 'handler' => false]); + $this->addColumnControl($target, ['order', 'searchDropdown']); return $this; } diff --git a/tests/Html/Extensions/ColumnControlTest.php b/tests/Html/Extensions/ColumnControlTest.php index e7e3687..e372e94 100644 --- a/tests/Html/Extensions/ColumnControlTest.php +++ b/tests/Html/Extensions/ColumnControlTest.php @@ -143,10 +143,6 @@ public function it_can_add_column_control_search_dropdown() ['target' => 1, 'content' => ['order', 'searchDropdown']], ]; $this->assertEquals($expected, $builder->getAttributes()['columnControl']); - - // Should also set ordering options - $attributes = $builder->getAttributes(); - $this->assertEquals(['indicators' => false, 'handler' => false], $attributes['ordering']); } #[Test]