Forum Academy Marketplace Showcase Pricing Features

Inputs inside repeating group showing wrong values

Hello folks, i’m having an issue with a repeating group and inputs values.

I have a products repeating group, where an user can pick products and set the amount desired. Below the rg, i display the sum of quantities using state, and a formula taken from this topic.

All works fines, except when a product is removed from the rg. When this happen, the input get an empty value, as seen in the screenshot below:

I was excepting the inputs would keep the values, when an item is removed from the state list, but that’s not what’s happening. Is this the correct behaviour?

Demo

Editor

When the second row is deleted, the third row appears to move up, but internally in the page DOM Bubble is trying to be efficient and reuses the same elements, which sometimes results in weird behaviour, like throwing away any “unsaved” changes.

To fix this, set the input’s default value from the custom state list.

Yeah, i saw that DOM issue when trying to understand what was happening anda already tried the fix proposed by you. But, it doesn’t work as expected as show in this gif

Things get more weird, when you remove a row, and add a new one. The old value appears on the “new” row

I’ve updated the reference example to be more robust.

With Bubble’s more recent functionality (than the original example), it no longer needs to use anything from Toolbox.

Hi @mishav , thanks for the update. The solution works like a charm :slight_smile:

If anyone is looking for the answer, visit those links provided by @mishav :
Demo
Editor