Fixed #130: option `onEditable` not available in mode `form`

This commit is contained in:
jos 2015-12-31 14:22:27 +01:00
parent 554bf00817
commit 7eb0803185
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,11 @@
https://github.com/josdejong/jsoneditor
## not yet released, version 5.0.1
- Fixed #130: option `onEditable` not available in mode `form`.
## 2015-12-31, version 5.0.0
- New design.

View File

@ -43,7 +43,8 @@ Node.prototype._updateEditability = function () {
this.editable.field = this.editor.options.mode === 'tree';
this.editable.value = this.editor.options.mode !== 'view';
if (this.editor.options.mode === 'tree' && (typeof this.editor.options.onEditable === 'function')) {
if ((this.editor.options.mode === 'tree' || this.editor.options.mode === 'form') &&
(typeof this.editor.options.onEditable === 'function')) {
var editable = this.editor.options.onEditable({
field: this.field,
value: this.value,