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

Draggable row table of PatternFly 4 threw an error when I drag table row in horizon direction then move in vertical direction #6723

Closed
Tracked by #6317
judy20191103 opened this issue Dec 30, 2021 · 7 comments
Labels

Comments

@judy20191103
Copy link

I have a question about Draggable row table of PatternFly 4.
when I dragged one table row in horizontal direction out of the table, and it still in origin place . Then I dragged the table row in vertical direction, the page was crashed and threw an error:
"TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'."
I found that thrown from the move function of the demo code.
This issue can repeat stably.
can you have a try and fix this issue?

@judy20191103
Copy link
Author

I think I have found the reason of this issue:
we shuold initialize tempItemOrder's value is the same as itemOrder, like below:
useEffect(() => {
setItemOrder(props.rows.map((r) => r.id.toString()));
setTempItemOrder(props.rows.map((r) => r.id.toString()))
}, [props.rows]);
otherwise, when we trigger onDragOver event in 'if' condition(drag table row in horizontal direction), the tempItemOrder value is [], then we drag the table tow in vertical direction, triggering the onDragOver event 'else' condition, but the tempItemOrder is [], so
the move function threw an error for its empty array without attribute id.

@nicolethoen
Copy link
Contributor

This will likely be addressed when we tackle this issue: #6531

@stale
Copy link

stale bot commented Mar 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Mar 15, 2022
@stale
Copy link

stale bot commented May 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label May 15, 2022
@stale stale bot closed this as completed May 29, 2022
@nicolethoen nicolethoen reopened this May 31, 2022
@stale stale bot removed the wontfix label May 31, 2022
@nicolethoen
Copy link
Contributor

Still plan to address this when we tackle this issue: #6531

@stale
Copy link

stale bot commented Jul 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jul 30, 2022
@stale
Copy link

stale bot commented Sep 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Sep 30, 2022
@stale stale bot closed this as completed Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants