How to identify the last item of a subRow array? #5621
-
Hi folks, so I'd like to add some custom styles for each last item in a subrow, is there a way to know if a rendered subrow is the last one from that group? |
Beta Was this translation helpful? Give feedback.
Answered by
mauriciosoares
Jun 21, 2024
Replies: 1 comment
-
Ended up solving this using just css, by selecting the row where the next item has a specific class, and added only in the parent row div that class... so the HTML structure would look like: <div class="parent"></div>
<div class="subRow"></div>
<div class="subRow"></div>
<div class="parent"></div>
<div class="subRow"></div>
<div class="subRow"></div> and used this simple snippet to select every row where the next element is a
Also used |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mauriciosoares
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ended up solving this using just css, by selecting the row where the next item has a specific class, and added only in the parent row div that class... so the HTML structure would look like:
and used this simple snippet to select every row where the next element is a
.parent
:Also used
last-child
to make sure the very last item of the list also has the styles applied.