Skip to content

Commit

Permalink
FIX remove placeholder search text on readonly field
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewandante committed Oct 8, 2024
1 parent 483e944 commit 5835657
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Forms/SearchableDropdownTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public function getPlaceholder(): string
return $emptyString;
}
}
$name = $this->getName();
if ($this->getUseDynamicPlaceholder()) {
if ($this->getIsSearchable()) {
if (!$this->getIsLazyLoaded()) {
Expand Down Expand Up @@ -598,6 +597,9 @@ public function performReadonlyTransformation()
$field->setSource($this->sourceList);
$field->setReadonly(true);

// Remove the text "Type to search..." on a read-only field
$this->setUseDynamicPlaceholder(false);

return $field;
}
}

0 comments on commit 5835657

Please sign in to comment.