I've been using jQuery-QueryBuilder to implement an Advanced Search feature in my Rails app. It's cool.
Right now, I want to customize the templates by adding a new Add group called Add Custom Group as my screenshot.
The behavior of Add Custom Group button is almost the same Add group button, but I will have some more logic to add default filters when that button is clicked.
I'm debugging in this callback now, beforeAddGroup.queryBuilder(event, object). However, when I do object.$el
or event.target
, I get the whole div element that contains everything as you can see in the screenshot and that's why I cannot find a way to see which group button is clicked yet.
In short, my objective is to know which group button is clicked whether it is either Add group or Add Custom Group.
Please feel free to let me know if further detail is required and would help you identify my issue and we can find the solution.