mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Compare commits
3 Commits
1086cc0a7d
...
88a752e08d
Author | SHA1 | Date | |
---|---|---|---|
|
88a752e08d | ||
|
0fed76ecf1 | ||
|
b5203fdc50 |
@ -139,7 +139,6 @@ trait SearchableDropdownTrait
|
||||
return $emptyString;
|
||||
}
|
||||
}
|
||||
$name = $this->getName();
|
||||
if ($this->getUseDynamicPlaceholder()) {
|
||||
if ($this->getIsSearchable()) {
|
||||
if (!$this->getIsLazyLoaded()) {
|
||||
@ -598,6 +597,9 @@ trait SearchableDropdownTrait
|
||||
$field->setSource($this->sourceList);
|
||||
$field->setReadonly(true);
|
||||
|
||||
// Remove the text "Type to search..." on a read-only field
|
||||
// $field->setPlaceholder('');
|
||||
|
||||
return $field;
|
||||
}
|
||||
}
|
||||
|
@ -73,6 +73,8 @@ class SearchableDropdownTraitTest extends SapphireTest
|
||||
$this->assertSame('My empty string', $field->getPlaceholder());
|
||||
$field->setPlaceholder('My placeholder');
|
||||
$this->assertSame('My placeholder', $field->getPlaceholder());
|
||||
$readonlyField = $field->performReadonlyTransformation();
|
||||
$this->assertSame('', $readonlyField->getPlaceholder());
|
||||
}
|
||||
|
||||
public function testSeachContext(): void
|
||||
|
Loading…
Reference in New Issue
Block a user