Merge pull request #256 from MiroHibler/develop
Error if 'search' option set to false
This commit is contained in:
commit
178610a76c
|
@ -3,6 +3,11 @@
|
|||
https://github.com/josdejong/jsoneditor
|
||||
|
||||
|
||||
## not yet released, version 5.1.1
|
||||
|
||||
- Fixed #255: Removed wrong console warning about the option `search`.
|
||||
|
||||
|
||||
## 2016-01-14, version 5.1.0
|
||||
|
||||
- Implemented support for JSON schema validation, powered by `ajv`.
|
||||
|
|
|
@ -77,7 +77,7 @@ function JSONEditor (container, options, json) {
|
|||
'ace', 'theme',
|
||||
'ajv', 'schema',
|
||||
'onChange', 'onEditable', 'onError', 'onModeChange',
|
||||
'escapeUnicode', 'history', 'mode', 'modes', 'name', 'indentation'
|
||||
'escapeUnicode', 'history', 'search', 'mode', 'modes', 'name', 'indentation'
|
||||
];
|
||||
|
||||
Object.keys(options).forEach(function (option) {
|
||||
|
|
|
@ -145,7 +145,9 @@ treemode.set = function (json, name) {
|
|||
}
|
||||
|
||||
// clear search
|
||||
this.searchBox.clear();
|
||||
if (this.searchBox) {
|
||||
this.searchBox.clear();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1147,4 +1149,4 @@ module.exports = [
|
|||
mixin: treemode,
|
||||
data: 'json'
|
||||
}
|
||||
];
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue