forked from json-editor/json-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dev/fix-base64
- Loading branch information
Showing
8 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
### Unreleased | ||
|
||
- fixed issue #1364 | ||
|
||
### 2.10.1 | ||
|
||
- Added keep_only_existing_values option | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* global Feature Scenario */ | ||
|
||
Feature('GitHub issue 1364') | ||
|
||
Scenario('GitHub issue 1364 should remain fixed @issue-1364', ({ I }) => { | ||
I.amOnPage('issues/issue-gh-1364.html') | ||
I.waitForElement('.je-ready') | ||
I.waitForValue('#value', '{"engine":"none","child1":{}}') | ||
I.selectOption('[id="root[engine]"]', 'test1') | ||
I.waitForValue('#value', '{"engine":"test1","child1":{"L2Name":""},"L1Name":""}') | ||
I.selectOption('[id="root[engine]"]', 'none') | ||
I.waitForValue('#value', '{"engine":"none","child1":{}}') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>GitHub Issue 1364</title> | ||
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> | ||
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css"> | ||
<script src="../../../dist/jsoneditor.js"></script> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<a href="https://github.com/json-editor/json-editor/issues/1158">GitHub Issue 1364</a> | ||
<label for="value">Value</label> | ||
<textarea class="form-control" id="value" rows="6" style="font-size: 12px; font-family: monospace;"></textarea> | ||
<div id='editor_holder'></div> | ||
</div> | ||
|
||
<script> | ||
var defaultSchema = { | ||
"type": "object", | ||
"properties": { | ||
"engine": { | ||
"type": "string", | ||
"enum": ["none", "test1"] | ||
}, | ||
"child1": { | ||
"type": "object", | ||
"properties": { | ||
"L2Name": { | ||
"type": "string", | ||
"options": { | ||
"dependencies": { | ||
"root.engine": "test1" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"L1Name": { | ||
"type": "string", | ||
"options": { | ||
"dependencies": { | ||
"root.engine": "test1" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
var value = document.querySelector('#value') | ||
var editor = new JSONEditor(document.getElementById('editor_holder'),{ | ||
iconlib: 'fontawesome5', | ||
object_layout: 'normal', | ||
schema: defaultSchema, | ||
show_errors: 'always', | ||
theme: 'bootstrap4' | ||
}); | ||
|
||
editor.on('change', function () { | ||
value.value = JSON.stringify(editor.getValue()) | ||
}) | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters