In a grid system that displays data based on a search box, I have a column with two containers inside. The first container is bound by a formula to show when it meets certain requirements. However, I am unable to bind the second container to any conditions. Therefore, I want to bind its visibility to the other container in the same row.
Unfortunately, I’m struggling to find a way to accomplish this.
Could you show a screenshot ? What do you mean by you are unable to bind the second container ? You can’t click on the binding button ? The Binding popup doesn’t show up ?
If you think you have a bug please report it on support.weweb.io
I don’t think it’s a bug in weweb. I think it’s more my non skills in doing what I want and my incapability to explain myself properly.
But let me try to explain it again…
I have a list with items and I succeed to bind a container when the list met the requirements set.
But what I am not able to figure out is… when list is empty, I want to show a different container instead of it showing ‘Empty List’. So the question is, how can I display an object, like a container, when list is empty?
Hopefully, I this time am able to explain the situation a bit better.
No worries!
How did you bind your list so it appear only when the requirement are met ?
You will need to improve the condition so the list doesn’t appear when its empty. You can use the “if” and “length” formulas and bind it to the display or the conditional rendering condition
Thank you for your answer. And yes, your answer displays the data of the results. I am also able to create this part.
But I want to display a container when the list is empty and am not able to do it. I have tested your reverse method, but it still only displays ‘Empty List’, instead of the container I want to display when list is empty.
Is there something I can do, that when list is empty, it displays a text, container or information I want to show people?
Try just to bind “False” to the conditional rendering of your first container, and “True” to the conditional rendering of your second container.
Do your first container disappear and the second one show up ?
If not, you may have a bug. If yes, you may struggle to create the right formula. Could you share with me what you’re trying to bind to the condition of the Conditional Rendering section please ?
**3. Users will see a list of teams with the team name and image when searching for a team. In the end, they can see whether they have already sent a request. If they haven’t sent a request before, I want to show a button (in a container) where users can send a request to join. Now it only shows an ‘Empty list’ in the editor and a blank on the front end. **
I still don’t think it’s a bug; it’s probably due to my lack of skills and knowledge that I can’t achieve the desired result. So hopefully, your insight could guide me in the right direction.
I’m not sure why you’re trying to use a collection list on your last column ?
You should use a text or a button I think
Then you need to be able to know if a given team has already be requested by your user. I don’t know how your data is formatted so I can’t help you more.
But probably, once you replace your collection list with a text or a button, you can bind the display of the element with a formula looking like :
// For your request sent text
if(length(filterByKey(AllJoinRequests, 'teamid', item.teamId)), true, false)
// For your request to join text
if(length(filterByKey(AllJoinRequests, 'teamid', item.teamId)), false, true)