-
Notifications
You must be signed in to change notification settings - Fork 29
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
Conversation
</tbody> | ||
) | ||
}) | ||
.filter(Boolean) as JSX.Element[] |
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.
[F] The filter is the only change.
@@ -297,6 +297,9 @@ export const DragDropContainer: React.FC<DragDropContainerProps> = ({ | |||
|
|||
const wrappedItems = items | |||
.map(draggable => { | |||
if (!draggable) { |
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.
[F] This is another just in case (the resulting array was already filtered).
ac060c7
to
bb0132c
Compare
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 |
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.
[F] rowsOrder
can contain path
s that no longer exist because it is updated by setRowsOrder
from useState
.
Closes #5052