ghiscoding / Aurelia-Bootstrap-Plugins

Aurelia-Bootstrap-Plugins are Custom Elements to bridge with a set of 3rd party Bootstrap addons
https://ghiscoding.github.io/Aurelia-Bootstrap-Plugins
MIT License
45 stars 23 forks source link

Fix order-insensitive array comparison #75

Closed ItWorksOnMyMachine closed 5 years ago

ItWorksOnMyMachine commented 5 years ago

When multiselect is true and "Select all" is clicked, there is an infinite loop where bootstrap-select returns a list, the list is set in abp-select that causes bootstrap-select to fire again, it returns the list to abp-select, but in a different order, etc. etc. The commented out code that uses a.every and b.includes works in typescript. I'm assuming you are using Babel, and I don't know if it will polyfill for old IE browsers, so I dropped back to plain old Javascript looping.