victor-valencia / bootstrap-iconpicker

A simple icon picker
https://victor-valencia.github.com/bootstrap-iconpicker/
MIT License
377 stars 140 forks source link

Multiple fields with different custom iconsets conflicting each other #61

Open leomontenegro6 opened 7 years ago

leomontenegro6 commented 7 years ago

Bootstrap Iconpicker has the option to provide custom iconsets, which I'm using to implement support of picking icons of FatCow Web Icons. Basically I've created a CSS file w/ rules for showing all PNG images through "background-image" property, and this way, now I can choose not only 16x16 icons, but 32x32 as well.

It's working fine since you use only one kind of custom iconsets. When I have two iconpicker fields, each with a different iconset (the first one loads 16x16 icons and the second one 32x32 icons), the icon list of the second field overwrites the first one. This results in both fields showing the same total iconsets, which is not true.

This library is great and has potential to become even better. It'd be great if this bug becomes fixed.

ruturajpatki commented 6 years ago

Not possible for me to guess the reason for this, perhaps JSFiddle may help more. But from an outset, have you init the lib on ID of the field or Class?