Skip to content

Commit

Permalink
* list: use rendered item on handle click event.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Aug 30, 2024
1 parent a987504 commit 1eb9054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/list/src/component/nested-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ export class NestedList<P extends NestedListProps = NestedListProps, S extends N
protected _handleClick(event: MouseEvent) {
const info = super._handleClick(event);
if (info) {
const {item, keyPath, target} = info as MouseEventInfo;
const {renderedItem: item, keyPath, target} = info as MouseEventInfo;
const {nestedToggle} = this.props;
if (!item.items || event.defaultPrevented || target.closest('.not-nested-toggle') || (nestedToggle && !item.disabled && !target.closest(nestedToggle)) || (!nestedToggle && !item.disabled && target.closest('a,.btn,.item-checkbox,.open-url,input,select,textarea') && !target.closest('.nested-toggle-icon,.item-icon'))) {
return info;
Expand Down

0 comments on commit 1eb9054

Please sign in to comment.