diff --git a/src/ListView.php b/src/ListView.php index a62871c69..2922c9ff8 100644 --- a/src/ListView.php +++ b/src/ListView.php @@ -136,6 +136,13 @@ public function itemView(string|Closure $value): self return $new; } + public function itemViewTag(?string $tag): self + { + $new = clone $this; + $new->itemViewTag= $tag; + return $new; + } + /** * return new instance with the HTML attributes for the container of item view. * diff --git a/tests/ListView/BaseTest.php b/tests/ListView/BaseTest.php index 7c869df83..8e70c279a 100644 --- a/tests/ListView/BaseTest.php +++ b/tests/ListView/BaseTest.php @@ -292,6 +292,31 @@ public function testChangeItemsWrapperTag(): void ); } + public function testChangeItemsAndItemWrapperTag(): void + { + Assert::equalsWithoutLE( + << +