-
Notifications
You must be signed in to change notification settings - Fork 81
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
feat(block-group, list): Add event for when a move is halted due to canPut
or canPull
returning false
#11567
Conversation
canPull
or canPut
returns false
canPull
or canPut
returns falsecanPull
or canPut
returns false
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
# Conflicts: # packages/calcite-components/src/components/list/list.tsx
@jcfranco @macandcheese this is still awaiting review. |
|
||
if (!fromEl) { | ||
return; | ||
} | ||
|
||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is shared, let’s create a utility for both list
and block-list
to use, and do the same for their tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this as part of a new refactor issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, but let’s make it a priority to unify these paths as soon as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created #11849
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
PR-title/changelog-wise, would developers know when |
canPull
or canPut
returns falsecanPut
or canPull
@jcfranco how about Also, are the event names acceptable? I wasn't sure if Spawns from this option: https://github.com/SortableJS/Sortable?tab=readme-ov-file#group-option |
🚢 it!
Good question. Fail makes it sound like This got me thinking, if a developer is handling failed moves, will they typically need to listen for both events? If so, maybe they can share the same event regardless of |
Yeah we could do that. Should I proceed? |
SGTM! |
canPut
or canPull
canPut
or canPull
canPut
or canPull
canPut
or canPull
returning falsy
canPut
or canPull
returning falsycanPut
or canPull
returning false
Related Issue: #11447
Summary
canPull
orcanPut
returns falsecanPull
andcanPut
when moving items via the "Move to" menu provided under the drag handle