mirror of https://github.com/ColorlibHQ/AdminLTE
feat(3973): enhance ExpandableTable with button click beside table row click
parent
52d947384e
commit
41e2971cd2
|
@ -51,7 +51,15 @@ class ExpandableTable {
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleRow() {
|
toggleRow() {
|
||||||
const $element = this._element
|
let $element = this._element
|
||||||
|
|
||||||
|
if ($element[0].nodeName !== 'TR') {
|
||||||
|
$element = $element.parent()
|
||||||
|
if ($element[0].nodeName !== 'TR') {
|
||||||
|
$element = $element.parent()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const time = 500
|
const time = 500
|
||||||
const $type = $element.attr(SELECTOR_ARIA_ATTR)
|
const $type = $element.attr(SELECTOR_ARIA_ATTR)
|
||||||
const $body = $element.next(SELECTOR_EXPANDABLE_BODY).children().first().children()
|
const $body = $element.next(SELECTOR_EXPANDABLE_BODY).children().first().children()
|
||||||
|
|
|
@ -86,7 +86,27 @@
|
||||||
transition: transform $transition-speed linear;
|
transition: transform $transition-speed linear;
|
||||||
}
|
}
|
||||||
&[aria-expanded="true"] {
|
&[aria-expanded="true"] {
|
||||||
td i.expandable-table-caret {
|
i.expandable-table-caret {
|
||||||
|
// stylelint-disable selector-max-attribute
|
||||||
|
&[class*="right"] {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
&[class*="left"] {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
// stylelint-enable selector-max-attribute
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[aria-expanded="true"] {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
i.expandable-table-caret {
|
||||||
|
transition: transform $transition-speed linear;
|
||||||
|
}
|
||||||
|
[data-widget="expandable-table"] {
|
||||||
|
i.expandable-table-caret {
|
||||||
// stylelint-disable selector-max-attribute
|
// stylelint-disable selector-max-attribute
|
||||||
&[class*="right"] {
|
&[class*="right"] {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
|
|
Loading…
Reference in New Issue