I’m using react-yandex-maps (https://github.com/R1ZEN/react-yandex-maps) library and I need to handle clicking on individual placemarks, and I’m having trouble with figuring out how to do so. How can I add onClick to rendedred objects on map?
<YMaps>
<Map className="w-full h-full"
state={{center: center, zoom: 12}}
onBoundsChange={handleBoundsChange}
>
<ObjectManager
options={{
clusterize: true,
}}
objects={{
preset: "islands#greenDotIcon",
}}
clusters={{
preset: "islands#redClusterIcons",
}}
defaultFeatures={data.result.data.map((el: APZ) => ({
type: "Feature",
id: el.id,
geometry: {
type: "Point",
coordinates: [el.lat, el.long],
},
}
))}
/>
</Map>
</YMaps>