()
| 810 | } |
| 811 | |
| 812 | _createRemoveAllRowsButton () { |
| 813 | const button = this.getButton('button_delete_all', 'delete', 'button_delete_all_title') |
| 814 | button.classList.add('json-editor-btntype-deleteall') |
| 815 | button.addEventListener('click', (e) => { |
| 816 | e.preventDefault() |
| 817 | e.stopPropagation() |
| 818 | |
| 819 | if (!this.askConfirmation()) { |
| 820 | return false |
| 821 | } |
| 822 | |
| 823 | const values = this.getValue() |
| 824 | |
| 825 | this.empty(true) |
| 826 | this.setValue([]) |
| 827 | this.onChange(true) |
| 828 | this.jsoneditor.trigger('deleteAllRows', values) |
| 829 | }) |
| 830 | this.controls.appendChild(button) |
| 831 | return button |
| 832 | } |
| 833 | |
| 834 | showValidationErrors (errors) { |
| 835 | /* Get all the errors that pertain to this editor */ |
no test coverage detected