refactor: Mouse button of event
This commit is contained in:
parent
aa40877469
commit
ba96b889da
1 changed files with 4 additions and 2 deletions
|
|
@ -230,7 +230,9 @@ tags:
|
|||
const rowTarget = event.target.closest('tr');
|
||||
const groupTarget = event.target.closest('[name="group"]');
|
||||
|
||||
if (rowTarget && event.button === 0) {
|
||||
if (event.button !== 0) return;
|
||||
|
||||
if (rowTarget) {
|
||||
for (const row of rows) {
|
||||
row.classList.remove('active');
|
||||
}
|
||||
|
|
@ -238,7 +240,7 @@ tags:
|
|||
rowTarget.classList.add('active');
|
||||
}
|
||||
|
||||
if (groupTarget && event.button === 0) {
|
||||
if (groupTarget) {
|
||||
console.log('group');
|
||||
let currentRow = groupTarget.closest('tr').nextElementSibling;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue