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(Datagrid): add disabled/locked col drag functionality back #3598

Conversation

matthewgallo
Copy link
Member

Contributes to #3455

Adds back the functionality to:

  1. Prevent dragging of columns that are disabled
  2. Prevent items to be dropped/reordered to positions that are disabled

What did you change?

packages/ibm-products/src/components/Datagrid/Datagrid/DraggableElement.js
packages/ibm-products/src/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js
packages/ibm-products/src/components/Datagrid/Extensions/ColumnCustomization/ColumnCustomization.stories.js

How did you test and verify your work?

Storybook

@netlify
Copy link

netlify bot commented Oct 13, 2023

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit e0ae14a
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/652970b9af23e200082074b7
😎 Deploy Preview https://deploy-preview-3598--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@elycheea elycheea left a comment

Choose a reason for hiding this comment

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

Oooh, thanks for fixing this. So this implementing still allows us to drag to the position of a locked column but prevents the reordering from updating? I think ideally, we should prevent dropping into the locked column position, but understand if that’s not possible with dnd-kit now. 🤔

Copy link
Contributor

@elycheea elycheea left a comment

Choose a reason for hiding this comment

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

Opened a separate issue for improving the interaction so I think this is ready to go. 🎉

@elycheea elycheea added this pull request to the merge queue Oct 17, 2023
Merged via the queue into carbon-design-system:main with commit b36deb7 Oct 17, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants