mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #552] [MERGED] Fix node using itself as anchor resulting in incorrect ordering #614
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#614
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/552
Author: @Adictya
Created: 1/19/2026
Status: ✅ Merged
Merged: 1/23/2026
Merged by: @kommander
Base:
main← Head:fix-array-revarsal-resulting-in-wrong-order📝 Commits (5)
73c6a2afix: add checks to make self anchoring no-op06db366chore: remove only test isolationd2c029echore: control-flow test formattingbd1e90efix: update invalid anchor testf532c70Merge branch 'main' into fix-array-revarsal-resulting-in-wrong-order📊 Changes
4 files changed (+82 additions, -6 deletions)
View changed files
📝
packages/core/src/Renderable.ts(+11 -2)📝
packages/core/src/tests/renderable.snapshot.test.ts(+2 -4)📝
packages/core/src/tests/renderable.test.ts(+28 -0)📝
packages/solid/tests/control-flow.test.tsx(+41 -0)📄 Description
Fixes an edge case where if the node itself is provided to insertBefore as anchor as well, the node gets inserted at the wrong index.
Issue got noticed in a testcase of reversing an array in solid and trigerring a re-render which didn't result in the correct item order.
Tests included at both core and solid level
Also makes non existing anchor a non fatal error.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.