mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-06-26 14:39:27 +02:00
Resolve Performance issues with TagField
TagField hydrates the entire result set because a parent class calls `toArray()` on the $source. This fix changes the source to an empty array, so no such manipulation can be made.
This commit is contained in:
parent
705c7fb525
commit
3797049a31
|
@ -71,7 +71,7 @@ class TagField extends DropdownField
|
||||||
{
|
{
|
||||||
$this->setSourceList($source);
|
$this->setSourceList($source);
|
||||||
$this->setTitleField($titleField);
|
$this->setTitleField($titleField);
|
||||||
parent::__construct($name, $title, $source, $value);
|
parent::__construct($name, $title, [], $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user