Skip to content

Commit 2aa23bc

Browse files
authored
Add beforeReset / beforeClear events
1 parent 62f6f44 commit 2aa23bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/public.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ QueryBuilder.prototype.destroy = function() {
2323
* Reset the plugin
2424
*/
2525
QueryBuilder.prototype.reset = function() {
26+
this.trigger('beforeReset');
27+
2628
this.status.group_id = 1;
2729
this.status.rule_id = 0;
2830

@@ -37,6 +39,8 @@ QueryBuilder.prototype.reset = function() {
3739
* Clear the plugin
3840
*/
3941
QueryBuilder.prototype.clear = function() {
42+
this.trigger('beforeClear');
43+
4044
this.status.group_id = 0;
4145
this.status.rule_id = 0;
4246

0 commit comments

Comments
 (0)