Skip to content
This repository was archived by the owner on Nov 30, 2025. It is now read-only.

Conversation

@xy9iao
Copy link
Contributor

@xy9iao xy9iao commented Mar 4, 2025

Fix #230: Enable reordering in EditorArrayNode

Changes Made:

  • Added Move Up / Down buttons to allow users to swap items
  • Make sure UI update after swapping elements: Forced React to re-render components using key to ensure changes are reflected

Reason for forcing re-rendering:

  • After transforming the previous data to the new location, only the image data re-renders. The Name and Room parts remian the same on UI
  • Had to force re-rendering using:
    key={`${index}-${version}`}

@xy9iao xy9iao changed the title Fix #230: Added Move Up / Move Down buttons in EditorArrayNode for re… Fix CMS: Rearrangeable array elements #230 Mar 4, 2025
@xy9iao xy9iao requested a review from some-molasses March 5, 2025 06:02
@xy9iao xy9iao merged commit 227896a into main Mar 15, 2025
3 checks passed
@xy9iao xy9iao deleted the rearrangeable-array-elements branch March 15, 2025 23:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CMS: Rearrangeable array elements

3 participants