In React with patternfly I’m trying to create a component for entering http header and values in a key value format. But when I delete second row, log says it’s deleted and rendered properly. but visually last row only deleted. Link for codesandbox https://codesandbox.io/s/react-key-value-component-ctn3l?file=/src/App.tsx
Please help me with your inputs to solve this issue. Thanks for your time.
As @Vibhav commented, this is happening because of index is used as key. This link talks in detail.