[view/DE,bugfix][xs]: use (rather than overwrite!) passed in config options.
This commit is contained in:
10
src/view.js
10
src/view.js
@@ -76,11 +76,11 @@ my.DataExplorer = Backbone.View.extend({
|
|||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.el = $(this.el);
|
this.el = $(this.el);
|
||||||
this.config = options.config || {};
|
this.config = _.extend({
|
||||||
_.extend(this.config, {
|
displayCount: 10
|
||||||
displayCount: 10
|
, readOnly: false
|
||||||
, readOnly: false
|
},
|
||||||
});
|
options.config);
|
||||||
if (this.config.readOnly) {
|
if (this.config.readOnly) {
|
||||||
this.setReadOnly();
|
this.setReadOnly();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user