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

Tree_Drag and Drop: validateDropPoint function is throwing error #6048

Closed
rinnuagna opened this issue Feb 27, 2024 · 2 comments · Fixed by #6100
Closed

Tree_Drag and Drop: validateDropPoint function is throwing error #6048

rinnuagna opened this issue Feb 27, 2024 · 2 comments · Fixed by #6100
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@rinnuagna
Copy link

Describe the bug

I am dragging some values and dropping it inside a primereact tree. It is throwing an error from tree.esm.js:1212 i.e Uncaught TypeError: Cannot read properties of null (reading 'path')
error
at validateDropPoint
This was a previously working functionality

Reproducer

No response

PrimeReact version

10.3.2

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

All browsers

Steps to reproduce the behavior

No response

Expected behavior

No response

@rinnuagna rinnuagna added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 27, 2024
@arnodemer
Copy link
Contributor

at least lines 110 and 213 should take care that dragState.current might be null or undefined
then use dragState.current**?**.path

@melloware
Copy link
Member

Feel free to submit a PR @arnodemer you can run npm run dev to test the code using the showcase.

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 28, 2024
@melloware melloware added this to the 10.5.2 milestone Mar 6, 2024
nitrogenous added a commit that referenced this issue Mar 14, 2024
…_6048

Fix #6048: Avoid throwing error while drop on tree component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants