Closed k4v1cs closed 3 months ago
I haven't tried reproduction yet, but keep in mind that using ArrayInput for scalar values is an edge case in which we won't spend much time. We recommend using AutocompleteArrayInput or SelectArrayInput instead.
reproduced, thanks
What you were expecting: Removing an item should only remove that one item
What happened instead: When empty inputs are present removing an item removes other items as well
Steps to reproduce: Have an ArrayInput with string values. The array and values are validated as required. Sandbox: https://codesandbox.io/p/devbox/arrayinput-remove-item-issue-sx4zky?file=%2Fsrc%2FApp.tsx%3A25%2C26&workspaceId=03aee9bf-4bf8-480d-97ef-9f80cfaf967b
Steps 1:
Expected result:
https://github.com/marmelab/react-admin/assets/4885562/624fb9fb-4b24-4d56-a7ac-3fabbefb9676
Steps 2:
Expected result:
Actual result:
https://github.com/marmelab/react-admin/assets/4885562/1b0e9877-124d-4c36-a805-1b0078b0a9ca
Related code:
Environment