willb335 / chessboardjsx

:black_square_button: Chessboard built for React
https://chessboardjsx.com
MIT License
267 stars 79 forks source link

Can't drag&drop after dynamically change position #68

Closed HikeGrig closed 3 years ago

HikeGrig commented 3 years ago

I lose draggable after i change position dynamically via state using React functional component. I need to make something like this https://chessboardjs.com/examples.html#3001 + it should be draggable

Here is sandbox example: https://codesandbox.io/s/cool-frog-i55it?file=/src/Demo.js

willb335 commented 3 years ago

https://codesandbox.io/s/dawn-rgb-3hkcf?file=/src/Demo.js

Seems to work, there is still an animation bug

HikeGrig commented 3 years ago

https://codesandbox.io/s/dawn-rgb-3hkcf?file=/src/Demo.js

Seems to work, there is still an animation bug

Thanks for that solution, how i can fix that animation bug?

willb335 commented 3 years ago

https://codesandbox.io/s/dawn-rgb-3hkcf?file=/src/Demo.js