Properties of Reusable Not Updating in RG When Removed from RG

I don’t know if this is a bug or some kind of ‘expected behavior’…when I have a reusable element I put into an RG and that RG has the ability for the datasource list of items to be modified such as to remove items. When I remove an item from the RG and the number of cells in the RG decreases, the reusable elements that were in the RG cells that are now no longer present, show as ‘not visible’ instead of being completely removed.

What this causes is the properties set onto the reusable elements get switched…meaning if I have 2 cells in RG, and the item from RG cell 1 is deleted from the list, the RG cell 2 is actually removed from the RG and the reusable element and it’s properties from RG cell 2 are now shown as ‘not visible’ while the reusable in RG cell 1 remains and the properties remain, even though they were set while using values from the previously removed list item.

I think this has something to do with the fact that the property values are set via a workflow action, but is the fact that the reusable element changes from visible to ‘not visible’ when in fact it should be removed and not available in the element inspector since the deletion of the list item that changes the rg from 2 cells to 1 cell should make it so any elements that were in RG cells that are no longer present are deleted from page and not just made to be ‘not visible’?

It is the same thing with a custom state on the reusable. If I have a custom state on the reusable element that I set while it is visible in RG because the RG has 2 cells, I delete list item #1, so RG now has 1 cell, the custom states on the reusable that was in RG cell #2 are not on the reusable that is now in RG cell #1…so, if I want functionality to reference a reusable element inside of an RG, and allow a user to remove items from the list or add items to the list and have them appear in any order (ie: not just in the last position) the property values and custom state values of the reusables get all out of whack…I think it is because of removing the RG cell # that corresponded to the list item deleted position, and instead bubble just removes the last RG cell anytime any list item is deleted regardless of position.

So now need to find a way to update all property values and custom states to reflect the value of the rg cell only when an event of other items in the list are removed…great, added complexity.

Pretty much how RG cell elements are rendered client side in my experience. Bubble dynamically creates and remove div elements (RG cells) during runtime. You can see this in the browser inspector.

For your case you could instead reference the data source list instead of the RG to get around this issue.

1 Like

I’m having to think through best approach for this, and found it. Reason it was not so straight forward, is that the property values were being used to construct the values in the RG itself.

Thanks for confirming it is normal behavior for how they remove elements.

1 Like

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