conditional visibility if 1-* = empty - Mendix Forum

conditional visibility if 1-* = empty

1

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

 

 

asked
2 answers

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;

Created

related post

 

https://community.mendix.com/link/space/app-development/questions/129223

Created