File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,15 @@ public function allowClear(bool $state = true): static
1818 return $ this ->opts (['allowClear ' => $ state ]);
1919 }
2020
21+ /**
22+ * @param string $value
23+ * @return $this
24+ */
25+ public function placeholder (string $ value ): static
26+ {
27+ return $ this ->optsPlaceholder ($ value );
28+ }
29+
2130 /**
2231 * @param string $text
2332 * @param string $id
Original file line number Diff line number Diff line change @@ -196,6 +196,9 @@ public function it_can_create_select2_field()
196196 $ field ->processPaginatedResults ('username ' , 'user_id ' );
197197 $ this ->assertStringContainsString ('e.text = e.username ' , $ field ->opts ['ajax ' ]['processResults ' ]);
198198 $ this ->assertStringContainsString ('e.id = e.user_id ' , $ field ->opts ['ajax ' ]['processResults ' ]);
199+
200+ $ field ->placeholder ('New Placeholder ' );
201+ $ this ->assertEquals ('New Placeholder ' , $ field ->opts ['placeholder ' ]['text ' ]);
199202 }
200203
201204 /** @test */
You can’t perform that action at this time.
0 commit comments