Fixed showing child fields as options when sorting an object
This commit is contained in:
parent
6288139aa7
commit
28215132f7
|
@ -353,6 +353,39 @@ div.jsoneditor-contextmenu button.jsoneditor-type-modes > div.jsoneditor-icon {
|
||||||
color: #808080;
|
color: #808080;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jsoneditor-modal .jsoneditor-select-wrapper {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jsoneditor-modal .jsoneditor-select-wrapper:after {
|
||||||
|
content: "";
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-left: 5px solid transparent;
|
||||||
|
border-right: 5px solid transparent;
|
||||||
|
border-top: 6px solid #666;
|
||||||
|
position: absolute;
|
||||||
|
right: 8px;
|
||||||
|
top: 14px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jsoneditor-modal select {
|
||||||
|
padding: 3px 24px 3px 10px;
|
||||||
|
min-width: 180px;
|
||||||
|
max-width: 350px;
|
||||||
|
|
||||||
|
-webkit-appearance:none;
|
||||||
|
-moz-appearance:none;
|
||||||
|
appearance: none;
|
||||||
|
|
||||||
|
text-indent: 0;
|
||||||
|
text-overflow: "";
|
||||||
|
font-size: 10pt;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
.jsoneditor-modal select::-ms-expand {
|
.jsoneditor-modal select::-ms-expand {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,9 @@ function showSortModal (node, container) {
|
||||||
var field = modal.modalElem().querySelector('#field');
|
var field = modal.modalElem().querySelector('#field');
|
||||||
var direction = modal.modalElem().querySelector('#direction');
|
var direction = modal.modalElem().querySelector('#direction');
|
||||||
|
|
||||||
var paths = node.getChildPaths();
|
var paths = node.type === 'array'
|
||||||
|
? node.getChildPaths()
|
||||||
|
: ['.'];
|
||||||
|
|
||||||
paths.forEach(function (path) {
|
paths.forEach(function (path) {
|
||||||
var option = document.createElement('option');
|
var option = document.createElement('option');
|
||||||
|
|
Loading…
Reference in New Issue