Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
react-leaflet geojson with custom popup for each polygon not working correctly

Extending the following question: React-leaflet geojson onEachFeature popup with custom react component

I am trying to have a Form within each popup that renders. Ideally the user is able to edit certain values within the form and then submit it. Each polygon should have its own popup on click.

However, when i follow the question above, the event listeners aren't working. e.g, the page just refreshes instead of the e.preventDefault() working.

Could anyone point me how to solve this? or a more elegant solution?

fiddle/codesandbox: https://codesandbox.io/s/react-leaflet-geojson-oneachfeature-popup-with-custom-react-component-forked-dzo4jx

ALTERNATIVELY: A react component based method that unpacks the geojson, but this one, the mouseover event isnt working.. https://codesandbox.io/s/react-leaflet-geojson-oneachfeature-popup-with-custom-react-component-forked-8430lw

Either approach that solves the problem will do.

Thank you

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!