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

Event Handler Properties Change on Shape Ignored?

Open joewood opened this issue 10 years ago • 1 comments

I hit a problem where subsequent render iterations on a Shape with a key in a collection didn't modify the property. The original bound mousedown event handler was still being used by the ART Shape. Checking the code, does Shape process componentWillReceiveProps ? I can see the call to applyNodeProps but it's not clear if new event handlers are re-applied.

joewood avatar Sep 24 '15 01:09 joewood

It should: https://github.com/reactjs/react-art/blob/master/src/ReactART.js#L354

And the listeners should be replaced: https://github.com/reactjs/react-art/blob/master/src/ReactART.js#L277

Do you have a reproducible example or perhaps a unit test?

sebmarkbage avatar Sep 24 '15 07:09 sebmarkbage