@eturnity/eturnity_reusable_components 1.2.86-EPDM-7509 → 1.2.86-EPDM-7509.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
:cellPaddings="cellPaddings"
|
14
14
|
:tableCursor="tableCursor"
|
15
15
|
@mouseover="setHovers($event)"
|
16
|
+
@mouseleave="setHovers($event)"
|
16
17
|
>
|
17
18
|
<slot />
|
18
19
|
</table-container>
|
@@ -382,25 +383,28 @@ export default {
|
|
382
383
|
},
|
383
384
|
methods: {
|
384
385
|
setHovers(event) {
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
386
|
+
if (event.target.tagName !== 'TABLE') {
|
387
|
+
console.log('over', event)
|
388
|
+
let hoveredCell = event.target
|
389
|
+
console.log(hoveredCell.tagName)
|
390
|
+
|
391
|
+
if (hoveredCell.tagName !== 'TD') {
|
392
|
+
let currentParentElement = hoveredCell.parentElement
|
393
|
+
while (currentParentElement.tagName !== 'TR') {
|
394
|
+
console.log(currentParentElement.tagName)
|
395
|
+
if (currentParentElement.tagName === 'TD') hoveredCell = currentParentElement
|
396
|
+
currentParentElement = currentParentElement.parentElement
|
397
|
+
}
|
394
398
|
}
|
395
|
-
}
|
396
399
|
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
400
|
+
if (hoveredCell) {
|
401
|
+
const rowChildren = Array.from(hoveredCell.parentElement.children)
|
402
|
+
const rowList = Array.from(document.querySelectorAll('tr'))
|
403
|
+
rowList.forEach((el) => {
|
404
|
+
const cells = Array.from(el.children)
|
405
|
+
cells[rowChildren.indexOf(hoveredCell)].classList.add('hover')
|
406
|
+
})
|
407
|
+
}
|
404
408
|
}
|
405
409
|
}
|
406
410
|
}
|