Skip to content

On drag cancel prop - #232

Merged
Clariity merged 2 commits into
Clariity:mainfrom
miguelmato:on-drag-cancel-prop
Aug 3, 2026
Merged

On drag cancel prop#232
Clariity merged 2 commits into
Clariity:mainfrom
miguelmato:on-drag-cancel-prop

Conversation

@miguelmato

Copy link
Copy Markdown
Contributor

Description

This PR adds onPieceDragCancel prop to be able to customize the UI cleanup when the user explicitly cancel a drag event by right clicking or pressing Escape.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verifstructions so we can reproduce.

  • Manual Storybook Testing: Spun up pnpm storybook and verified that right clicking or pressing Escape triggers the callback but drag and dropping a piece outside the board does not.
  • Static Testing: Ran pnpm test:static locally to ensure no TypeScript compilation errors or Prettier formatting issues were introduced by the updated ChessboardOptions type definitions.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own
  • I have commented my code, particularly in
  • I have made corresponding changes to the
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally
  • Any dependent changes have been merged anmodules

@Clariity
Clariity merged commit 8316249 into Clariity:main Aug 3, 2026
1 check failed
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 5.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants