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.
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 inflounder.refs.data
or sections divs inflounder.refs.sections
.