Fixed #82 - Add row-click event to Table
parent
0803bac20a
commit
b27169098e
|
@ -616,13 +616,9 @@ export default {
|
|||
},
|
||||
onRowClick(e) {
|
||||
const event = e.originalEvent;
|
||||
const rowData = e.data;
|
||||
const rowIndex = e.index;
|
||||
|
||||
if (this.selectionMode) {
|
||||
let target = event.target;
|
||||
let targetNode = target.nodeName;
|
||||
let parentNode = target.parentElement && target.parentElement.nodeName;
|
||||
const target = event.target;
|
||||
const targetNode = target.nodeName;
|
||||
const parentNode = target.parentElement && target.parentElement.nodeName;
|
||||
|
||||
if (targetNode == 'INPUT' || targetNode == 'BUTTON' || targetNode == 'A' ||
|
||||
parentNode == 'INPUT' || parentNode == 'BUTTON' || parentNode == 'A' ||
|
||||
|
@ -630,6 +626,12 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
this.$emit('row-click', event);
|
||||
|
||||
if (this.selectionMode) {
|
||||
const rowData = e.data;
|
||||
const rowIndex = e.index;
|
||||
|
||||
if (this.isMultipleSelectionMode() && event.shiftKey && this.anchorRowIndex != null) {
|
||||
DomHandler.clearSelection();
|
||||
this.rangeRowIndex = rowIndex;
|
||||
|
|
Loading…
Reference in New Issue