Jump to content
  • 0

Have only one collapsible section open at any time


walkerc

Question

2 answers to this question

Recommended Posts

  • 0

Hello @walkerc

You need to insert the following code into the footer  of your result set:

<script type="text/javascript">
function inputHandler(event) {
 if (document.getElementById('clicked')) {
  let clickedElem = document.getElementById('clicked');
  clickedElem.click();
  clickedElem.id = "";
 }
 event.target.id = "clicked";
}

function assignEvent() {
 let elems1 = document.querySelectorAll('tr[data-cb-name="group1"]');
 let elems2 = document.querySelectorAll('span[data-cb-name="switch-group-state-btn"]');
 for(elem of elems1) {
  elem.addEventListener('click', inputHandler);
 };
 for(elem of elems2) {
  elem.remove();
 };
 document.removeEventListener('DataPageReady', assignEvent);
}

document.addEventListener('DataPageReady', assignEvent);
</script>

Prior to insert the code, you need to disable the HTML editor of the header. You can do this in the Advanced section of the footer.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...