if a listview is empty, we would like to hide the container that the listview is inside.
for instance, if a client has no job order connected, then we don't need to show the container with the title Joborders.
JobOrder_Client/JobOrders.JobOrder != empty
add this allow you to pop a class as direct first child of the listview.
add the class listview-afterempty, and it wills how if the listview is empty.
.listview-afterempty{
display: none;
}
.mx-listview:has(.mx-listview-empty) + .listview-afterempty{
display: block
}
Depending on your browser compatibility requirements the CSS has selector would work.
https://caniuse.com/css-has
https://css-tricks.com/the-css-has-selector/
Where you can just whether it has an "li" HTML element inside of it. And if not you set display: hidden; visibility: none;