carbon-design-system / carbon-addons-iot-react

A collection of React components shared between IBM Watson IoT products.
https://carbon-design-system.github.io/carbon-addons-iot-react/
Apache License 2.0
94 stars 76 forks source link

Table dnd enhancement #3839

Closed Happyrajsinh closed 5 months ago

Happyrajsinh commented 5 months ago

Closes #3838

Summary

Enahnces table drag and drop feature to drop table rows outside the table over breadcrumb nodes.

Change List (commits, features, bugs, etc)

Majority of the work is done in the useTableDnd.jsx. Prop hasBreadcrumbDrop is used to enable this feature in addition to hasDragAndDrop of table. When drag is started upon setting up of drag and drop through useEffect hook, mouse events like mouseEnter and mouseLeave are attached to all the breadcrumb nodes in the dom. Upon drop or drag cancel all these event listeners are removed.

Acceptance Test (how to verify the PR)

Regression Test (how to make sure this PR doesn't break old functionality)

Things to look for during review

netlify[bot] commented 5 months ago

Deploy Preview for carbon-addons-iot-react ready!

Name Link
Latest commit 866940c9a2b4ec583b15aabe5864c767a10a032f
Latest deploy log https://app.netlify.com/sites/carbon-addons-iot-react/deploys/65bbcc3ee2bbe60008a66961
Deploy Preview https://deploy-preview-3839--carbon-addons-iot-react.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.