mousemke / flounder

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

[MultiTag] Store an array of refs to currently selected tag divs #191

Open conor-cafferkey-sociomantic opened 6 years ago

conor-cafferkey-sociomantic commented 6 years ago

Currently

In several places in the code above we loop over refs.multiTagWrapper.childNodes to get the currently selected tags.

Problem

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.

Wanted

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.

conor-cafferkey-sociomantic commented 6 years ago

Related: