File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,6 @@ public function getPlaceholder(): string
139139 return $ emptyString ;
140140 }
141141 }
142- $ name = $ this ->getName ();
143142 if ($ this ->getUseDynamicPlaceholder ()) {
144143 if ($ this ->getIsSearchable ()) {
145144 if (!$ this ->getIsLazyLoaded ()) {
@@ -598,6 +597,9 @@ public function performReadonlyTransformation()
598597 $ field ->setSource ($ this ->sourceList );
599598 $ field ->setReadonly (true );
600599
600+ // Remove the text "Type to search..." on a read-only field
601+ $ field ->setPlaceholder ('' );
602+
601603 return $ field ;
602604 }
603605}
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ public function testPlaceholder(): void
7373 $ this ->assertSame ('My empty string ' , $ field ->getPlaceholder ());
7474 $ field ->setPlaceholder ('My placeholder ' );
7575 $ this ->assertSame ('My placeholder ' , $ field ->getPlaceholder ());
76+ $ readonlyField = $ field ->performReadonlyTransformation ();
77+ $ this ->assertSame ('' , $ readonlyField ->getPlaceholder ());
7678 }
7779
7880 public function testSeachContext (): void
You can’t perform that action at this time.
0 commit comments