mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
In the current Backgrid implementation, a cell can be made editable through "editable: true/false" settings. It takes only a boolean value.
Add support for a function that can be set as an editable option value.
For Example:
editable: function(m) { return false; }
This commit is contained in:
committed by
Dave Page
parent
e138ec53b6
commit
789ece89fb
@@ -1076,7 +1076,6 @@
|
|||||||
});
|
});
|
||||||
self.model.set(data.name, collection, {silent: true});
|
self.model.set(data.name, collection, {silent: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize a new Grid instance
|
// Initialize a new Grid instance
|
||||||
var grid = self.grid = new Backgrid.Grid({
|
var grid = self.grid = new Backgrid.Grid({
|
||||||
columns: gridSchema.columns,
|
columns: gridSchema.columns,
|
||||||
@@ -1452,7 +1451,8 @@
|
|||||||
// This can be disabled in some cases (if not hidden)
|
// This can be disabled in some cases (if not hidden)
|
||||||
|
|
||||||
disabled: (disabled ? true : evalASFunc(s.disabled)),
|
disabled: (disabled ? true : evalASFunc(s.disabled)),
|
||||||
editable: (disabled ? false : (_.isUndefined(s.editable) ? pgAdmin.editableCell : !!(s.editable))),
|
editable: _.isUndefined(s.editable) ?
|
||||||
|
pgAdmin.editableCell : evalASFunc(s.editable),
|
||||||
subnode: ((_.isString(s.model) && s.model in pgBrowser.Nodes) ?
|
subnode: ((_.isString(s.model) && s.model in pgBrowser.Nodes) ?
|
||||||
pgBrowser.Nodes[s.model].model : s.model),
|
pgBrowser.Nodes[s.model].model : s.model),
|
||||||
canAdd: (disabled ? false : evalASFunc(s.canAdd)),
|
canAdd: (disabled ? false : evalASFunc(s.canAdd)),
|
||||||
|
|||||||
Reference in New Issue
Block a user