TanStack / TanStack/form

field value get messed when use with sortable.js

Open
#2,002 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

v1 v2: needs investigation
Dominant language
TypeScript
Stars
6.7k
Forks
682
Avg merge
5d 18h
Merged PRs (30d)
7

Description

Describe the bug

field value get messed when use with sortable.js

Your minimal, reproducible example

https://codesandbox.io/p/devbox/tg34w3

Steps to reproduce

click add and input 2 different values in the input element then drag the handler to reorder, you will see the rendered input value is not swapping while the field.state.value is updated correctly

Expected behavior

the input value is correctly displayed

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

not related

TanStack Form adapter

None

TanStack Form version
"@tanstack/vue-form": "1.27.7",     "sortablejs": "1.15.6",     "vue": "^3.5.13"
TypeScript version

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction using @tanstack/vue-form, Vue, and SortableJS, then trace the field rendering during item reordering. Done means dragging swaps the displayed input values as well as the underlying field.state.value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.