At the moment my application is very dynamic. We get a list of components and insert it into the DOM one by one, it's not a repeat. The components aren't always in the same order.
I have an odd edge case where if 4 document widgets are inserted
And if they are toggled, the add icon remains at the top
This is the style 'X' icon has
element.style {
position: absolute;
margin: -10px;
z-index: 200;
width: auto;
inset: 0px 0px auto auto;
}
I am able to manually fix by decrementing z-index of each 'X' icon after. EX. 200, 199, 198, 197

May I ask how do I properly implement the z-index so that the component z-index decrement each time it appears in the DOM
Small Example here http://jsfiddle.net/f8jn04tb/1/

