mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 11:05:32 +02:00
Merge remote-tracking branch 'origin/2.4' into pulls/fix-react
This commit is contained in:
commit
5decfa39e1
@ -532,6 +532,8 @@ class TagField extends MultiSelectField
|
||||
/** @var ReadonlyTagField $copy */
|
||||
$copy = $this->castedCopy(ReadonlyTagField::class);
|
||||
$copy->setSourceList($this->getSourceList());
|
||||
$copy->setTitleField($this->getTitleField());
|
||||
|
||||
return $copy;
|
||||
}
|
||||
|
||||
|
@ -376,6 +376,12 @@ class TagFieldTest extends SapphireTest
|
||||
$field = new TagField('Tags', '', TagFieldTestBlogTag::get());
|
||||
$readOnlyField = $field->performReadonlyTransformation();
|
||||
$this->assertInstanceOf(ReadonlyTagField::class, $readOnlyField);
|
||||
|
||||
// Custom title field
|
||||
$field = new TagField('Tags', '', TagFieldTestBlogTag::get());
|
||||
$field->setTitleField('Name');
|
||||
$readOnlyField = $field->performReadonlyTransformation();
|
||||
$this->assertEquals('Name', $readOnlyField->getTitleField());
|
||||
}
|
||||
|
||||
public function testGetSchemaDataDefaults()
|
||||
|
Loading…
Reference in New Issue
Block a user