icheck icon indicating copy to clipboard operation
icheck copied to clipboard

Getting hold of original event within ifChanged function

Open seagullmouse opened this issue 7 years ago • 1 comments

My set up

  • I have a table where each row has a checkbox (lets call them C1, C2, ... Cn)
  • At the top of the table I have a check/uncheck all checkbox (Ca)
  • When I check Ca I use the ifChanged-Ca event to check all the other checkboxes C1, C2, ... Cn.
  • This causes the ifChanged-C1, ifChanged-C2, ifChanged-Cn events to fire
  • Within this ifChanged-C1, ifChanged-C2, ifChanged-Cn events I want to have code that says something like,
function (event) {
if(triggered by checked/unchecked directly on Cn){
doA();
}
if(originally triggered by checkbox Ca){
doB();
}
}
  • However I can't get hold of the original event within the event parameter. i.e. event.originalEvent is undefined.
  • Any ideas how I can achieve the above?

Thanks in advance

seagullmouse avatar Oct 11 '17 08:10 seagullmouse

Hey @seagullmouse Did you ever find a solution?

JacobCWRodgers avatar Apr 17 '23 18:04 JacobCWRodgers

So long ago now, I didn't find a solution but happy to close

seagullmouse avatar Mar 22 '24 10:03 seagullmouse