Skip to content

solid-form's .removeValue(index) in Array form fields not behaving as expected, when removing an index, it replaces all the values with last value. #1577

@manoj-sakthivel-17658

Description

@manoj-sakthivel-17658

Describe the bug

when using array form field in tanstack solid form, removing an index causes all the other values to be replaced by the last value.

for example, if the array values are 1, 2, 3, 4, 5. Removing the value at the first index, results in 5, 5, 5, 5.

if the value 3 is removed, then the result is 1, 2, 5, 5.

Your minimal, reproducible example

https://stackblitz.com/edit/solidjs-templates-pczeqty5?file=src%2FApp.jsx

Steps to reproduce

  1. remove the first value "apple".
  2. you can see that the other values become "netflix" (the last value)

or

  1. remove the second value "google"
  2. you can see that the values below it all becomes "netflix"

Expected behavior

If the array is 1, 2, 3, 4, 5. and the value 3 is removed, result should be 1, 2, 4, 5

How often does this bug happen?

Every time

Screenshots or Videos

Screen.Recording.2025-06-12.at.6.50.55.PM.mov

Platform

macos

TanStack Form adapter

solid-form

TanStack Form version

1.12.2

TypeScript version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions