showColumn on click of Indicator?

Tags: #<Tag:0x00007efc6b5b62d8> #<Tag:0x00007efc6b5b4988>

Hi! It took me a good 30 minutes to figure out the functionality of how to show a hidden column (clicking on the columns to the left and right of it) because I kept clicking and right clicking on the indicator itself assuming that would be used to trigger showing the columns. Is it possible to attach a custom click event to the indicators so that they have the same functionality as clicking the columns left and right of the indicator?

Hi @jaffe.maya

I totally agree. I created an issue in our internal ticketing system we should add a video on how to use the plugin with the description.

When it comes to the task. That’s challenging. There is no dedicated element (we use ::after and ::before on a DIV) so we might use the getBoundingClientRect on the header within the afterOnCellMouseDown hook. Something like this https://jsfiddle.net/vh79k5ut/2/

And then based on that you can determine if the clicked header index has header - 1 for

  if (event.clientX >= rect.left && event.clientX <= rect.left + pseudoElementWidth) {
    console.log('mousedown on left pseudo-element ::before');
  }

or header + 1 for

  else if (event.clientX >= rect.left + (tdWidth - pseudoElementWidth) && event.clientX <= rect.left + tdWidth) {
    console.log('mousedown on right pseudo-element ::after');
  }

to use showColumns() and them those columns back to view.

1 Like

That is absolutely true. We rely heavily on feedback from the community. While we do have an internal roadmap, we strive to align our goals with the needs and expectations of our clients whenever possible.

ps. if only of you would have issues with the proposed implementation please let me know.