@@ -15,7 +15,7 @@ class Input implements Control
1515 protected string $ type = 'text ' ;
1616 protected string $ placeholder = '' ;
1717
18- /** @var array<string|int,string > $options */
18+ /** @var array<string> $options */
1919 protected array $ options = [];
2020
2121 protected bool $ disabled = false ;
@@ -89,7 +89,7 @@ public function placeholder(string $placeholder): self
8989 }
9090
9191 /**
92- * @param array<string|int,string > $options
92+ * @param array<string> $options
9393 */
9494 public function options (array $ options ): self
9595 {
@@ -170,11 +170,8 @@ public function renderDom(DOMDocument $doc): DOMElement
170170 $ input ->setAttribute ('list ' , $ this ->name . '-options ' );
171171 $ datalist = $ doc ->createElement ('datalist ' );
172172 $ datalist ->setAttribute ('id ' , $ this ->name . '-options ' );
173- foreach ($ this ->options as $ value => $ label ) {
174- $ option = $ doc ->createElement ('option ' , $ label );
175- if (!is_int ($ value )) {
176- $ option ->setAttribute ('value ' , $ value );
177- }
173+ foreach ($ this ->options as $ value ) {
174+ $ option = $ doc ->createElement ('option ' , $ value );
178175 $ datalist ->appendChild ($ option );
179176 }
180177 $ wrapper = $ doc ->createElement ('div ' );
0 commit comments