Hide a cell of an RG when button clicked

I’m trying to hide/remove a specific cell of an RG when a button is clicked. I see mention of using custom states, but can’t find the specific steps to take to achieve this.

Can anyone help me out on this please?

Hiding or removing are two different things.

If your RG’s data source is searching for a data type, then to remove an item in the RG, you would need to make the thing of that specific cell not be a part of that search i.e. changing its field values if you’re using constraints or totally deleting that thing.

RG cells have a “different world” compared to the elements outside of the RG. To access them, you would need to do a lot of hacky ways or install certain plugins.

Before all of that, you need to tell us what you want to do. Is it to hide or remove a cell?

EDIT: My brain is a bit foggy right now so lmk if you have any questions :sweat_smile:

@ntabs Good point, what I’m trying to do is hide the cell. The RG’s data source is an API call’s response, so don’t want (and can’t) delete/remove the cell because its not actually in my DB.

You can remove an item from the RG by using a Display List Action.

Just set the RG Datasource to its current list minus item: current cell’s thing.

Put all of your elements used to display the content into a group…make that group collapse when hidden and put a condition to make it not visible based on some custom state value you create to know if a button (which is inside of this group) is clicked to hide the cell or not. This will make it so that when the button is clicked, you set a custom state which will be related to the condition for the cell to be visible or not.

On the RG itself in the appearance tab make sure the minimum height of the cell is set to 0

If this button is not in the RG cell you can do the exact same thing I mention above, but utilize the free plugin called orchestra to target a specific cell from outside the RG (ie: where the button would be) since elements from outside of an RG can not trigger actions for elements within a specific cell.

If this button is in the RG cell, then what I originally explained.

Im not sure if this could be helpful but i have a “notifications” repeating group showing notifications where are unread (within the data of the notification there is a yes/no defaulted to no) and whenever the RG group is clicked it changed that current cells notification to yes and removes it from the RG. Could be possible to create something similar.

@boston85719 ah yes! Unsure how I missed such a straightforward solution… but thank you!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.