bootstrap-multiselect icon indicating copy to clipboard operation
bootstrap-multiselect copied to clipboard

Reset button is disappearing after control rebuild

Open astrikov-d opened this issue 6 years ago • 2 comments

Hello! First of all, thank you for your great work on this plugin, it helps me a lot.

Not long time ago you've added support of "reset" button: https://github.com/davidstutz/bootstrap-multiselect/pull/678 But this button is disappearing after multiselect rebuild.

I guess, this.buildReset(); is missed inside rebuild function:

There is:

...
this.buildSelectAll();
this.buildDropdownOptions();
this.buildFilter();

this.updateButtonText();
this.updateSelectAll(true);
...

I guess, it should be:

...
this.buildSelectAll();
this.buildDropdownOptions();
this.buildFilter();
this.buildReset();

this.updateButtonText();
this.updateSelectAll(true);
...

May be it's missed in some other places too.

astrikov-d avatar Mar 19 '18 02:03 astrikov-d

This is correct. I added the line and it works. However, I would propose you put the code in this order:

this.buildSelectAll();
this.buildDropdownOptions();
this.buildReset();
this.buildFilter();

mrfisher8432 avatar May 07 '18 12:05 mrfisher8432

Would love to see this change beeing merged and published...

DaveSenn avatar Sep 07 '21 19:09 DaveSenn