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: Dragging tree nodes that do not have a dragdropScope explicitly set cause lowercase conversion for checks to fail. #6766

Closed
AnotherZane opened this issue Jun 18, 2024 · 1 comment · Fixed by #6767 or leoo1992/GeradorQRCode#57 · May be fixed by nhattpn/BTL_LTNC#56
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@AnotherZane
Copy link
Contributor

AnotherZane commented Jun 18, 2024

Describe the bug

Dragging tree nodes that do not have a dragdropScope explicitly set cause lowercase conversion for checks to fail. It seems to have originally been caused due to this commit.

Reproducer

https://stackblitz.com/edit/vitejs-vite-rnhzxy?file=src%2FApp.tsx

PrimeReact version

10.6.6

React version

17.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to the reproducer link.
  2. Open browser console.
  3. Select some text in a tree node and try to drag the text.
  4. The console is spammed with errors related to conversion of dragdropScope via toLocaleLowerCase due to it being undefined.

Expected behavior

The existence of the dragdropScope prop is checked prior to conversion.

@AnotherZane AnotherZane added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 18, 2024
AnotherZane added a commit to AnotherZane/primereact that referenced this issue Jun 18, 2024
@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 Jun 18, 2024
@melloware melloware added this to the 10.7.0 milestone Jun 18, 2024
@melloware
Copy link
Member

Thanks for the report and the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment