I have an RG that has dropdowns in each row. Number of rows will vary based on the product the user is viewing. Depending on what values the user chooses in the dropdowns, it will change the price of the product they are viewing.
I was going to use Custom States for this, having all the dropdown values in a custom state, where the pricing can reference the items in the state.
Two ways I’ve thought of, each have issues:
When user chooses a dropdown value, it gets added to the State. If the user changes the dropdown value I need to remove the previous value and replace it with the current one. Can I reference the previous dropdown value to remove it ‘minus item:’ from the custom state?
When a dropdown value is changed, remove all items from the custom state and then add all the values from the all dropdowns. Can I add values from all the dropdown values in an RG, if so, how do I reference all dropdown values from all rows?