Robdel12 / DropKick

A JavaScript plugin for creating beautiful, accessible, and painless custom dropdowns.

Home Page:http://dropkickjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reset multi select dropdown is not working

PandiyanCool opened this issue · comments

I had created two multi select drop down using dropkick, like nested drop down

Second dropdown options will populate based on first dropdown.
I have placed my populating code whenever outer dropdown change event occurs.

when i tried to reset(to uncheck the selected items and reload the options) the both dropdown at the same time like

$('#outerSelect').dropkick('reset'); //working
$('#innerSelect').dropkick('reset'); //not working

My inner dropdown gets reset, but my outer dropdown not restting.

But when commented out inner dropdown html codes and tried to reset the outer dropdown. Its working fine,

How can i resolve this?

Helps much appreciated

Thanks in advance

Could you give an example of your HTML markup? From your description of 'nested dropdown', it sounds like you're trying to put one select element inside of another? Maybe I'm just misunderstanding.

Since reset is working properly for at least one select, it sounds like Dropkick is working correctly. If you could make an example on JSBin, JSFiddle, or Codepen, I'd be happy to try and help sort this out.

This is happening because of cache implementation in dropkick.

The reset method doesn't do anything with the cache