Permalink
Browse files

BUGFIX: Fixed ManyManyPickerField constructing too many search fields.

  • Loading branch information...
1 parent 7727e19 commit 14e165cd2934cfc0648fe36e51c3142930b9de1c @ajshort ajshort committed Feb 4, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 code/ManyManyPickerField.php
@@ -18,7 +18,11 @@ public function __construct($parent, $name, $title=null, $options=null) {
}
public function getSearchField() {
- return new ManyManyPickerField_SearchField($this);
+ if (!$this->searchField) {
+ $this->searchField = new ManyManyPickerField_SearchField($this);
+ }
+
+ return $this->searchField;
}
public function getItemsQuery() {

0 comments on commit 14e165c

Please sign in to comment.