-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Use unique id instead of indices as keys for DraggableList #13553
Conversation
Welcome to the Appsmith community! Thank you for your first pull request and making this project better. 🤗 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Unable to find test scripts. Please add necessary tests to the PR. |
/ok-to-test sha=bd269b3 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2269201210. |
/ok-to-test sha=102dbcf |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2275567570. |
@@ -235,8 +235,8 @@ function DraggableList(props: any) { | |||
{springs.map(({ scale, y, zIndex }, i) => ( | |||
<animated.div | |||
{...bind(i)} | |||
data-rbd-draggable-id={items[i].id} | |||
key={i} | |||
data-rbd-draggable-id={items[i].pageId} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this change won't break the cypress tests? Just check and confirm once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may lead to bugs at other places as pageId is not being passed at all places. Since this is a bug in just one file app/client/src/pages/Editor/PagesEditor/index.tsx
you can use something similar here as file app/client/src/components/propertyControls/FieldConfigurationControl.tsx
line no. 226 and have send id as well as pageId with both being equal to pageId itself:
const draggableComponentColumns = pages.map(
({ identifier, isCustomField, isVisible, label }, index) => ({
id: identifier,
index,
isCustomField,
isVisible,
label,
}),
);
…ges-list-rename-bug
Thanks @ankitakinger , I have made those changes you suggested. Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2269201210. Click to view performance test results
|
1 similar comment
UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2269201210. Click to view performance test results
|
…ges-list-rename-bug
…ges-list-rename-bug
/ok-to-test sha=308da3e |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2293121983. |
UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2293121983. Click to view performance test results
|
1 similar comment
UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2293121983. Click to view performance test results
|
@berzerkeer @ankitakinger I actually had another PR in the pipeline for this on a different (duplicate) issue #12758. |
Description
Fixes #9991
Type of change
How Has This Been Tested?
Checklist:
Test coverage results 🧪
⚪ Total coverage has not changed