react-chessboard icon indicating copy to clipboard operation
react-chessboard copied to clipboard

amended behaviour of onPromotionPieceSelect prop

Open FlynnHillier opened this issue 1 year ago • 1 comments

Amended behaviour of onPromotionPieceSelect prop.

  • onPromotionPieceSelect is now passed 'promoteFromSquare' and 'promoteToSquare' arguments.
  • onPromotionPieceSelect is now a required prop with default value: () => true
  • onPromotionPieceSelect return value now dictates wether or not the move should be carried out.
    • previous behaviour meant if prop was provided (was previously optional) movement would not occur regardless of return value (I believe this was a bug)
  • updated readme to reference onPromotionPieceSelect

FlynnHillier avatar Mar 12 '24 19:03 FlynnHillier

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-chessboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2024 7:30pm

vercel[bot] avatar Mar 12 '24 19:03 vercel[bot]