Skip to content

Morph function does not morph icon....  #4

@Mantic

Description

@Mantic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions