Compare commits

..

2 Commits

Author SHA1 Message Date
Andrew Paxley
0fed76ecf1 DEBUG see what the field thinks will show 2024-10-10 16:32:05 +13:00
Andrew Paxley
b5203fdc50 FIX remove placeholder search text on readonly field 2024-10-10 15:02:14 +13:00
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -73,6 +73,8 @@ class SearchableDropdownTraitTest extends SapphireTest
$this->assertSame('My empty string', $field->getPlaceholder()); $this->assertSame('My empty string', $field->getPlaceholder());
$field->setPlaceholder('My placeholder'); $field->setPlaceholder('My placeholder');
$this->assertSame('My placeholder', $field->getPlaceholder()); $this->assertSame('My placeholder', $field->getPlaceholder());
$readonlyField = $field->performReadonlyTransformation();
$this->assertSame('', $readonlyField->getPlaceholder());
} }
public function testSeachContext(): void public function testSeachContext(): void