clauderic / clauderic/react-sortable-hoc
prop `index` for sortableElement(HOC)
- Dominant language
- JavaScript
- Stars
- 10.9k
- Forks
- 959
- PR merge metrics
- No merged PRs in 30d
Description
**2 major concerns**
1. Nowhere in the [change logs](https://github.com/clauderic/react-sortable-hoc/blob/master/CHANGELOG.md) is mentioned that it's now treating `index` as internal props. So, after upgrading from 1.9 to 1.10.1, it stopped passing index to children.
2. If index is not passed then it throws the Warning **The prop `index` is marked as required in `sortableElement(HOC)`**. Note, it's warning, not error. if it's mandatory, then why does it just show the warning and not throw the error? That's bad by design. Otherwise, the row, your're swapping onto is permanently removed from the UI.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the upgrade from version 1.9 to 1.10.1 and inspect how sortableElement(HOC) handles the index prop. Done means the intended child index behavior is restored or clearly documented, and the missing-index behavior no longer leaves a swapped row permanently removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100