Skip to content

"OnElementSelected" is not fired on props change #3

@amirhouieh

Description

@amirhouieh

Facing same issue as in old-version. While the wrapper component is updated with new props, but onElementSelected is only called once!
here is my component render method:

  render() {
    const {currentIndex} = this.props;
    const selector = currentIndex === 1 ? "g": "path";
    return (
        <div className={style.iconWrapper}>
          {currentIndex}
          <SvgLoader path={"/persons.svg"}>
            <SvgProxy selector={selector}
                      onElementSelected={(nodes) => {
                        console.log(nodes);
                      }}/>
          </SvgLoader>
        </div>
    )
  }

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