()
| 496 | } |
| 497 | |
| 498 | _createAddRowButton () { |
| 499 | const button = this.getButton(this.getItemTitle(), 'add', 'button_add_row_title', [this.getItemTitle()]) |
| 500 | button.classList.add('json-editor-btntype-add') |
| 501 | button.addEventListener('click', (e) => { |
| 502 | e.preventDefault() |
| 503 | e.stopPropagation() |
| 504 | |
| 505 | const editor = this.addRow() |
| 506 | this.refreshValue() |
| 507 | this.refreshRowButtons() |
| 508 | this.onChange(true) |
| 509 | this.jsoneditor.trigger('addRow', editor) |
| 510 | }) |
| 511 | this.controls.appendChild(button) |
| 512 | return button |
| 513 | } |
| 514 | |
| 515 | _createDeleteLastRowButton () { |
| 516 | const button = this.getButton('button_delete_last', 'subtract', 'button_delete_last_title', [this.getItemTitle()]) |
no test coverage detected