Skip to content

Commit 5835657

Browse files
committed
FIX remove placeholder search text on readonly field
1 parent 483e944 commit 5835657

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Forms/SearchableDropdownTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
$this->setUseDynamicPlaceholder(false);
602+
601603
return $field;
602604
}
603605
}

0 commit comments

Comments
 (0)