Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"OnElementSelected" is not called #26

Closed
musatarosu335 opened this issue Apr 28, 2018 · 2 comments
Closed

"OnElementSelected" is not called #26

musatarosu335 opened this issue Apr 28, 2018 · 2 comments

Comments

@musatarosu335
Copy link

Thank you for a great tool.
I have one question.

I ran the following code.
(template contains the path to the SVG file)

const SvgComponent = ({ template }) => (
  <Samy path={template}>
    <SvgProxy
      selector="#Image image"
      onElementSelected={e => (console.log(e))}
    />
  </Samy>
);

In the first rendering,

onElementSelected = {e => (console.log (e))}

Although the contents of it are displayed,
After the second time (template contents change and re-rendered) onElementSelected will not be called.

Why'onElementSelected` is not called?

Thank you.

@hugozap
Copy link
Owner

hugozap commented Apr 29, 2018

Thanks for the report. I just fixed this issue in the new repository https://github.com/hugozap/react-svgmt Please change your dependency to react-svgmt and change Samy to SvgLoader.

@hugozap hugozap closed this as completed Apr 29, 2018
@musatarosu335
Copy link
Author

Thank you for fixing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants