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

fix: Tree missing drag drop functionality #7181

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions components/lib/tree/UITreeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,15 @@ export const UITreeNode = React.memo((props) => {
const contentProps = mergeProps(
{
ref: contentRef,
className: classNames(props.node.className, cx('content', { checked, selected, nodeProps: props, isCheckboxSelectionMode })),
className: classNames(
props.node.className,
cx('content', {
checked,
selected,
nodeProps: props,
isCheckboxSelectionMode
})
),
style: props.node.style,
onClick: onClick,
onDoubleClick: onDoubleClick,
Expand Down Expand Up @@ -961,7 +969,6 @@ export const UITreeNode = React.memo((props) => {
'aria-setsize': props.node.children ? props.node.children.length : 0,
'aria-posinset': props.index + 1,
onKeyDown: onKeyDown,
'aria-expanded': expanded,
melloware marked this conversation as resolved.
Show resolved Hide resolved
'aria-selected': checked || selected
},
getPTOptions('node')
Expand All @@ -977,7 +984,7 @@ export const UITreeNode = React.memo((props) => {

const node = createNode();

if (props.dragdropScope && !props.disabled && (!props.parent || props.parent.droppable)) {
if (props.dragdropScope && !props.disabled && (!props.parent || props.parent.droppable !== false)) {
const beforeDropPoint = createDropPoint(-1);
const afterDropPoint = props.last ? createDropPoint(1) : null;

Expand Down
Loading