Hello community - I’m getting user complains that the icon to expand/collapse views on the form are too small and difficult to click. In the legacy theme, I was able to come up with some JQuery to make the entire view header clickable to expand/collapse the view, but I’m having a hard time doing the same with the modern theme (K2 5.9). If anybody else has solved this issue, would they be willing to share their script (or other approach)? Thanks in advance!
Solved
Expand/Collapse View - Click the Entire View Header Script
Best answer by TinTex
I have only done minimal testing, but ai provided:
<script>!function(e){var t=".grid-header-wrapper, .grid-header-text, .view-header, .panel-header, .panel-template-header";e(document).on("click",t,(function(c){var n=e(this).find("a.collapse-vertical, a.expand-vertical, a.collapse, a.expand");n.length&&!e(c.target).closest("a, button, input, select, textarea").length&&n.trigger("click")})),e("<style>").prop("type","text/css").html(t+" { cursor: pointer !important; user-select: none; }").appendTo("head")}(jQuery);</script>
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

