Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

BUGFIX: Fixed ManyManyPickerField constructing too many search fields.

  • Loading branch information...
commit 14e165cd2934cfc0648fe36e51c3142930b9de1c 1 parent 7727e19
Andrew Short authored February 04, 2011

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  code/ManyManyPickerField.php
6  code/ManyManyPickerField.php
@@ -18,7 +18,11 @@ public function __construct($parent, $name, $title=null, $options=null) {
18 18
 	}
19 19
 
20 20
 	public function getSearchField() {
21  
-		return new ManyManyPickerField_SearchField($this);
  21
+		if (!$this->searchField) {
  22
+			$this->searchField = new ManyManyPickerField_SearchField($this);
  23
+		}
  24
+
  25
+		return $this->searchField;
22 26
 	}
23 27
 
24 28
 	public function getItemsQuery() {

0 notes on commit 14e165c

Please sign in to comment.
Something went wrong with that request. Please try again.