(i, ignore)
| 124 | } |
| 125 | |
| 126 | getElementEditor (i, ignore) { |
| 127 | const schemaCopy = extend({}, this.schema.items) |
| 128 | const editor = this.jsoneditor.getEditorClass(schemaCopy, this.jsoneditor) |
| 129 | const row = this.row_holder.appendChild(this.theme.getTableRow()) |
| 130 | let holder = row |
| 131 | if (!this.item_has_child_editors) { |
| 132 | holder = this.theme.getTableCell() |
| 133 | row.appendChild(holder) |
| 134 | } |
| 135 | |
| 136 | const ret = this.jsoneditor.createEditor(editor, { |
| 137 | jsoneditor: this.jsoneditor, |
| 138 | schema: schemaCopy, |
| 139 | container: holder, |
| 140 | path: `${this.path}.${i}`, |
| 141 | parent: this, |
| 142 | compact: true, |
| 143 | table_row: true |
| 144 | }) |
| 145 | |
| 146 | ret.preBuild() |
| 147 | if (!ignore) { |
| 148 | ret.build() |
| 149 | ret.postBuild() |
| 150 | |
| 151 | ret.controls_cell = row.appendChild(this.theme.getTableCell()) |
| 152 | ret.row = row |
| 153 | ret.table_controls = this.theme.getButtonHolder() |
| 154 | ret.controls_cell.appendChild(ret.table_controls) |
| 155 | ret.table_controls.style.margin = 0 |
| 156 | ret.table_controls.style.padding = 0 |
| 157 | } |
| 158 | |
| 159 | return ret |
| 160 | } |
| 161 | |
| 162 | destroy () { |
| 163 | this.innerHTML = '' |
no test coverage detected