diff --git a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
index 56932f294..3343edca1 100644
--- a/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid/backgrid.pgadmin.js
@@ -294,29 +294,29 @@
* Select2Cell for backgrid.
*/
var Select2Cell = Backgrid.Extension.Select2Cell = Backgrid.Cell.extend({
-
className: "select2-cell",
-
+ defaults: _.defaults({
+ select2: {}
+ }, Backgrid.Cell.prototype.defaults),
events: {
"change": "onSave",
"select2:unselect": "onSave"
},
template: _.template(
- '',
- null,
- {variable: null}
+ ''
),
render: function () {
var col = _.defaults(this.column.toJSON(), this.defaults),
model = this.model, column = this.column,
editable = Backgrid.callByNeed(col.editable, column, model),
- optionValues = this.optionValues;
+ optionValues = _.clone(this.optionValues || this.column.get('options'));
this.$el.empty();
if (!_.isArray(optionValues)) throw new TypeError("optionValues must be an array");
- /* Add empty option as Select2 requires any empty '