From b400ea758c578c61725097fcf830bb55d989dce6 Mon Sep 17 00:00:00 2001 From: Simon Gschnell Date: Wed, 13 Dec 2023 12:54:44 +0100 Subject: [PATCH] fixing the hide/show all collapsed table columns function by calling the click event instead of changing the classes and styles manually --- .../Cis/Profil/MitarbeiterProfil.js | 48 +++++++++---------- .../Cis/Profil/MitarbeiterViewProfil.js | 6 +-- .../js/components/Cis/Profil/StudentProfil.js | 6 +-- .../Cis/Profil/StudentViewProfil.js | 6 +-- 4 files changed, 31 insertions(+), 35 deletions(-) diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index 0f672a005..9cd334431 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -190,23 +190,19 @@ export default { //* changes the icon for every collapsed column to open or closed [...document.getElementsByClassName("tabulator-responsive-collapse-toggle")].forEach(ele => { - if(showCollapsedColumn){ - ele.classList.add("open"); - - }else{ - ele.classList.remove("open") - } - }); - - //* hides or shows the collapsed columns - [...document.getElementsByClassName("tabulator-responsive-collapse")].forEach(ele => { if(showCollapsedColumn){ - ele.style.display="" - + if(!ele.classList.contains("open")) + ele.click(); }else{ - ele.style.display="none" + if(ele.classList.contains("open")) + ele.click(); } - }); + + + }); + + + } @@ -219,13 +215,13 @@ export default { -
+
-
+