Row selection does not trigger checkbox change event

Row selection does not trigger checkbox change event

icewingicewing Posts: 3Questions: 1Answers: 0

Hi to All,

It seems that the change event of a checkbox only triggers when the checkbox itself was clicked. However, when a row is selected, it checks the checkbox but does not trigger change event.

This causes an issue when you click a table row and add add an event attached to it and do a count of all checked checkboxes, it will not include the most recent action as the checkbox checking did not happen at that moment and would not trigger afterwards.

How is it possible to make the change event work correctly?

Best Regards,

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • icewingicewing Posts: 3Questions: 1Answers: 0

    Hi Colin,

    Thanks for letting me know. I have added the JSFiddle here to test it out. Check the console to see what I mean.

    https://jsfiddle.net/jtdgb1oz/

  • icewingicewing Posts: 3Questions: 1Answers: 0
    edited December 2019

    Already fixed.

    For those interested to know, use the selectCallback function inside checkboxes to properly get the correct timing of checkbox checked status.

This discussion has been closed.