Skip to content

Commit

Permalink
chore(clayui.com): Collapse expand table-nested-rows
Browse files Browse the repository at this point in the history
  • Loading branch information
pat270 committed Sep 28, 2023
1 parent ce15249 commit e430fda
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions clayui.com/static/js/docs-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if (!Element.prototype.closest) {
var t = event.target;

var a = t.tagName === 'a' || t.tagName === 'button' ? t : t.closest('a') || t.closest('button');
var column = t.closest('.autofit-col-toggle') || false;

if (a) {
if (a.getAttribute('href') === '#1') {
Expand All @@ -37,6 +38,14 @@ if (!Element.prototype.closest) {
document.querySelector('body').classList.toggle(a.getAttribute('data-toggle'));
}
}

if (column) {
var button = column.querySelector('.component-action');

button.classList.toggle('show');

document.querySelector(button.dataset.target).classList.toggle('show');
}
});
})();

Expand Down

0 comments on commit e430fda

Please sign in to comment.