Problem With A Component Not Updating The DOM After Prop Has Changed

Posted 1 year ago by leachcreative

https://gist.github.com/andyleach/3525c9bbbd0d732a1f1caed9bcc6b6e6

Anytime I try and get rid of a specific item by clicking the button on line 24 of the StockAllocationsForm, it will get rid of the correct item in the parent component StockAllocations, and it will correctly pass the data back in the form of a prop to the StockAllocationsForm, however for reasons that are beyond me the DOM itself will not update with the correct data. For some reason it has decided that it will always remove the last item from the list. Does anyone have an idea for why this might be?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.