react-material-icons icon indicating copy to clipboard operation
react-material-icons copied to clipboard

Morph function does not morph icon....

Open Mantic opened this issue 7 years ago • 0 comments

I'm trying to do something similar as in the example in my own app, but for some reason I can't get icon morphing to work. I'm running React v15 and the latest react-material-icons. My object looks like this:

<MorphIcon shapes={{left: icons.hardware.keyboard_arrow_left, right: icons.hardware.keyboard_arrow_right}} options={{duration: 500}} ref={key} />

and when a button is pressed, I call:

this.refs[key].morph('left')

I've tried hard-coding the ref key to a simple name, but that doesn't work. I see that the icons morph initially into their first state, but once set, I cant' change them. Would this be a React caching issue?

Thanks, -Mike

Mantic avatar Jul 05 '17 17:07 Mantic