VictorCazanave / react-svg-map

A set of React.js components to display an interactive SVG map
https://victorcazanave.github.io/react-svg-map/
MIT License
229 stars 48 forks source link

Is there any option to define default checked locations? #39

Closed rommelmamedov closed 4 years ago

VictorCazanave commented 4 years ago

Currently there isn't any property to set the checked locations, but it may be a good idea to add it.

If you know how to do it, feel free to open a PR! Otherwise I'll try to do it next week.

rommelmamedov commented 4 years ago

Thanks for the quick response! I'll try to check up the source code for in order to implement it.

VictorCazanave commented 4 years ago

@rommelmamedov before merging the PR, what do you think of the new props selectedLocationId (for RadioSVGMap) and selectedLocationIds (for CheckboxSVGMap)? Are they convenient enough for your use case?

rommelmamedov commented 4 years ago

@rommelmamedov before merging the PR, what do you think of the new props selectedLocationId (for RadioSVGMap) and selectedLocationIds (for CheckboxSVGMap)? Are they convenient enough for your use case?

Yes, I think they are totally okay.