Hi,

There are two ways we can provide options for select2 cell either by
extending select2 cell with "optionValues" array or by passing "options"
(function or array) in column definition.

Generally, if we are passing "optionValues" to select2 cell then we should
not look for "options" in column definition but still we were looking for
"options". This was causing javascript code to break if "options" were not
passed in column definition.

Error fixed:

TypeError: this.column.get(...) is not a function
(this.column.get('options'))(this) :




-- 
*Harshal Dhumal*
*Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
index 5197f15..b87e84c 100644
--- a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
@@ -442,9 +442,9 @@
           model = this.model, column = this.column,
           editable = Backgrid.callByNeed(col.editable, column, model),
           optionValues = _.clone(this.optionValues ||
-                _.isFunction(this.column.get('options')) ?
+                (_.isFunction(this.column.get('options')) ?
                     (this.column.get('options'))(this) :
-                    this.column.get('options'));
+                    this.column.get('options')));
 
       this.undelegateEvents();
 
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to