hiding the element isn't hard, its replacing it that proves a challange.
to hide the element add this to your sass:
.mx-listview > ul.mx-list.mx-list-striped.mx-listview-list > li.mx-listview-empty {
display: none
}
I did a work around with this, that text that says "No Items Found" has a class associated with it, I believe it is .mx-list-empty or something similar to this. I set the color of the text to transparent, so that "No Items Found" would not appear. it is just a workaround, but it works for me, hopefully it helps.
add thsi to your scss.
.listview-afterempty{
display: none;
}
.mx-listview:has(.mx-listview-empty) + .listview-afterempty{
display: block
}
the directly after you listview, have a container with class listview-afterempty.
tadaa, if the listview is empty, the afterempty will be shown.
hi,
You do not need a helper entity for this.
The “No items found” row in a List View is default Mendix behavior when the data source returns an empty list. The correct way to handle this is through Conditional Visibility, not by changing your domain model.
If your List View is inside a Data View of Request and the data source is the association:
Offer__Request
Wrap the List View inside a Container and set Conditional Visibility on that container to:
not(empty($Request/Offer__Request))
This hides the List View completely when there are no related Offers.
If you want to show a custom message instead, add another container with:
empty($Request/Offer__Request)
and place your own message there.