Compare commits

..

1 Commits

Author SHA1 Message Date
Andrew Paxley
5835657133 FIX remove placeholder search text on readonly field 2024-10-08 17:04:07 +13:00
2 changed files with 1 additions and 3 deletions

View File

@ -598,7 +598,7 @@ trait SearchableDropdownTrait
$field->setReadonly(true);
// Remove the text "Type to search..." on a read-only field
// $field->setPlaceholder('');
$this->setUseDynamicPlaceholder(false);
return $field;
}

View File

@ -73,8 +73,6 @@ 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