Skip to content
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

Handle missing items in drag and drop container #5054

Merged
merged 2 commits into from
Dec 1, 2023
Merged

Conversation

mattseddon
Copy link
Member

@mattseddon mattseddon commented Nov 30, 2023

Closes #5052

@mattseddon mattseddon added the bug Something isn't working label Nov 30, 2023
@mattseddon mattseddon self-assigned this Nov 30, 2023
</tbody>
)
})
.filter(Boolean) as JSX.Element[]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[F] The filter is the only change.

@@ -297,6 +297,9 @@ export const DragDropContainer: React.FC<DragDropContainerProps> = ({

const wrappedItems = items
.map(draggable => {
if (!draggable) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[F] This is another just in case (the resulting array was already filtered).

@mattseddon mattseddon marked this pull request as ready for review December 1, 2023 00:39
Copy link

codeclimate bot commented Dec 1, 2023

Code Climate has analyzed commit bb0132c and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 87.5% (85% is the threshold).

This pull request will bring the total coverage in the repository to 95.3% (0.0% change).

View more on Code Climate.

</tbody>
)
})
const rows = rowsOrder
Copy link
Member Author

@mattseddon mattseddon Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[F] rowsOrder can contain paths that no longer exist because it is updated by setRowsOrder from useState.

@sroy3 sroy3 enabled auto-merge (squash) December 1, 2023 14:04
@sroy3 sroy3 merged commit 1d4d856 into main Dec 1, 2023
7 of 8 checks passed
@sroy3 sroy3 deleted the fix-undefined-item branch December 1, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plots sections is not responsive when exp push is happening
3 participants