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

feat: toggle sortable arrays and blocks #5962

Merged
merged 19 commits into from May 3, 2024

Conversation

kendelljoseph
Copy link
Contributor

@kendelljoseph kendelljoseph commented Apr 22, 2024

Description

Given arrays and Blocks can be sorted by admins, sorting should be able to be toggled in the config

Example

Fields: Array, Blocks

const Field: CollectionConfig = {
  admin: {
    isSortable: false
  }
}

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

@kendelljoseph kendelljoseph self-assigned this Apr 22, 2024
@kendelljoseph kendelljoseph marked this pull request as ready for review April 23, 2024 16:58
Copy link
Member

@denolfe denolfe left a comment

Choose a reason for hiding this comment

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

Looks good!

@denolfe denolfe merged commit 5c58bd3 into main May 3, 2024
33 checks passed
@denolfe denolfe deleted the feat/toggle-sortable-arrays-and-blocks branch May 3, 2024 14:38
franciscolourenco added a commit to franciscolourenco/payload that referenced this pull request May 6, 2024
The ability to disable sorting in array and block fields was added with
payloadcms#5962.

However the drag handles were still visible and looked interactive.

This commit hides the drag handles when `admin.isSortable: false`.
franciscolourenco added a commit to franciscolourenco/payload that referenced this pull request May 6, 2024
The ability to disable sorting in array and block fields was added with
payloadcms#5962.

However, the drag handles are still visible and look interactive
on hover.

This commit hides the drag handles when `admin.isSortable: false`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants