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(list, sort-handle): disable sort-handle when no move to items are present and item count is one #11073

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

driskull
Copy link
Member

@driskull driskull commented Dec 16, 2024

Related Issue: #10731

Summary

  • disable drag handle when a single item is in the list and the list has nowhere else to move to
  • add e2e
  • add story

BEGIN_COMMIT_OVERRIDE
END_COMMIT_OVERRIDE

@driskull driskull added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. no changelog entry Use the commit override to avoid a changelog entry labels Dec 16, 2024
@driskull driskull requested a review from jcfranco December 16, 2024 18:57
@driskull driskull marked this pull request as ready for review December 16, 2024 18:57
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

} = this;
const text = this.getLabel();

const isDisabled = disabled || !setPosition || !setSize;
const isDisabled =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the optional chaining operator on moveToItems needed? It looks like it's guaranteed now, but I could be missing something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not but I added for extra safety. I can remove it.

@driskull driskull added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Dec 16, 2024
@driskull driskull merged commit a19e95a into dev Dec 16, 2024
9 checks passed
@driskull driskull deleted the dris0000/sort-handle-fix branch December 16, 2024 20:18
@github-actions github-actions bot added this to the 2024-12-17 - Dec Milestone milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. no changelog entry Use the commit override to avoid a changelog entry pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants