Interesting behavior here, I actually kind of like the effect its having by crushing the border into this line, just it doesn’t do it for the last one!
The logic is just comparing Tags names and showing you the remaining usable Tags
hi @MattAllum12 there is many issues in your filter but you can start with using closest() instead parentElement as a parent of input is label and not a parent div wrapper. This is why display none is set only to label. So the code should be like ...closes('w-dyn-item').... Hope this will point you right direction.
hi @MattAllum12 if you do not have further questions about this topic feel free to close the request as solved.
BTW: you do not need .parentElement.closest() you can use just .closest() you can refer to MDN docs I have posted where is on top as first sentense how it works.
traverses the element and its parents (heading toward the document root) until it finds a node that matches the specified CSS Selector
in other words, you can say it is “bubbling”. Just in case I have made the important text you should understand in bold.