mousemke / flounder

Style-able dropdown replacement for native dropdowns
MIT License
9 stars 10 forks source link

Issue 161 remove array slice #175

Closed conor-cafferkey-sociomantic closed 6 years ago

conor-cafferkey-sociomantic commented 7 years ago

See #161

conor-cafferkey-sociomantic commented 7 years ago

Note: In several places in the code above we loop over refs.multiTagWrapper.childNodes to get the currently selected tags. This is slightly messy because since #122 the multiTagWrapper div also contains the searchbox (refs.search), meaning we always need to exclude the last child.

It might be a better idea to maintain an array of references to the currently selected tag divs: flounder.refs.tags. This would be similar to the array of option divs in flounder.refs.data or sections divs in flounder.refs.sections.