We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
clickable
1 parent db42d82 commit c8ff82fCopy full SHA for c8ff82f
src/components/advanced-marker.tsx
@@ -300,11 +300,12 @@ function useAdvancedMarker(props: AdvancedMarkerProps) {
300
useEffect(() => {
301
if (!marker) return;
302
303
+ // when clickable is defined, we will always use its value for gmpClickable.
304
+ // otherwise we auto-detect based on existing event-handlers.
305
const gmpClickable =
- clickable !== undefined ||
- Boolean(onClick) ||
306
- Boolean(onMouseEnter) ||
307
- Boolean(onMouseLeave);
+ clickable !== undefined
+ ? clickable
308
+ : Boolean(onClick) || Boolean(onMouseEnter) || Boolean(onMouseLeave);
309
310
// gmpClickable is only available in beta version of the
311
// maps api (as of 2024-10-10)
0 commit comments