From 3797049a31bfddb53f9bfd6454b2726fc4a6aef4 Mon Sep 17 00:00:00 2001 From: Simon Gow Date: Thu, 6 Sep 2018 18:16:06 +1200 Subject: [PATCH] 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. --- src/TagField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TagField.php b/src/TagField.php index 409a9d9..88b0b16 100644 --- a/src/TagField.php +++ b/src/TagField.php @@ -71,7 +71,7 @@ class TagField extends DropdownField { $this->setSourceList($source); $this->setTitleField($titleField); - parent::__construct($name, $title, $source, $value); + parent::__construct($name, $title, [], $value); } /**