@json-editor/json-editor 2.15.0 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +0 -4
- package/CHANGELOG.md +4 -0
- package/config/codeceptjs_helpers.js +11 -0
- package/dist/jsoneditor.js +1 -1
- package/dist/jsoneditor.js.LICENSE.txt +1 -1
- package/dist/nonmin/jsoneditor.js +7 -4
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/package.json +1 -1
- package/src/editors/select.js +7 -3
- package/tests/codeceptjs/editors/integer_test.js +3 -1
- package/tests/codeceptjs/editors/select_test.js +12 -0
- package/tests/docker-compose-local.yml +2 -1
- package/tests/pages/integer.html +9 -10
- package/tests/pages/select-values.html +91 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* * @name JSON Editor
|
|
4
4
|
* * @description JSON Schema Based Editor
|
|
5
5
|
* * This library is the continuation of jdorn's great work (see also https://github.com/jdorn/json-editor/issues/800)
|
|
6
|
-
* * @version "2.15.
|
|
6
|
+
* * @version "2.15.1"
|
|
7
7
|
* * @author Jeremy Dorn
|
|
8
8
|
* * @see https://github.com/jdorn/json-editor/
|
|
9
9
|
* * @see https://github.com/json-editor/json-editor
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* * @name JSON Editor
|
|
4
4
|
* * @description JSON Schema Based Editor
|
|
5
5
|
* * This library is the continuation of jdorn's great work (see also https://github.com/jdorn/json-editor/issues/800)
|
|
6
|
-
* * @version "2.15.
|
|
6
|
+
* * @version "2.15.1"
|
|
7
7
|
* * @author Jeremy Dorn
|
|
8
8
|
* * @see https://github.com/jdorn/json-editor/
|
|
9
9
|
* * @see https://github.com/json-editor/json-editor
|
|
@@ -9381,10 +9381,13 @@ var SelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
9381
9381
|
sanitized = this.enum_values[0];
|
|
9382
9382
|
}
|
|
9383
9383
|
if (this.value === sanitized) return;
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9384
|
+
var selectedIndex = this.enum_values.indexOf(sanitized);
|
|
9385
|
+
if (inEnum && selectedIndex !== -1) {
|
|
9386
|
+
this.input.value = this.enum_options[selectedIndex];
|
|
9387
|
+
} else if (this.hasPlaceholderOption) {
|
|
9387
9388
|
this.input.value = '_placeholder_';
|
|
9389
|
+
} else {
|
|
9390
|
+
this.input.value = sanitized;
|
|
9388
9391
|
}
|
|
9389
9392
|
this.value = sanitized;
|
|
9390
9393
|
if (!initial) {
|