Skip to content

Commit 5a1c522

Browse files
committed
Merge branch 'Add-class-to-rows-and-container-for-easier-CSS-styling' of https://github.com/Reggino/json-editor into Reggino-Add-class-to-rows-and-container-for-easier-CSS-styling
2 parents f2d40be + 14f4249 commit 5a1c522

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/editors/object.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,12 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({
140140
var row = this.theme.getGridRow();
141141
container.appendChild(row);
142142
for(j=0; j<rows[i].editors.length; j++) {
143-
var editor = this.editors[rows[i].editors[j].key];
143+
var key = rows[i].editors[j].key;
144+
var editor = this.editors[key];
144145

145146
if(editor.options.hidden) editor.container.style.display = 'none';
146147
else this.theme.setGridColumnSize(editor.container,rows[i].editors[j].width);
147-
148+
editor.container.className += ' container-' + key;
148149
row.appendChild(editor.container);
149150
}
150151
}
@@ -159,7 +160,7 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({
159160

160161
if(editor.options.hidden) editor.container.style.display = 'none';
161162
else self.theme.setGridColumnSize(editor.container,12);
162-
163+
editor.container.className += ' container-' + key;
163164
row.appendChild(editor.container);
164165
});
165166
}

0 commit comments

Comments
 (0)