I set the cursor prop as either crosshair or undefined based on a boolean state.
The cursor does not revert to its default behavior (grab interactions) once the prop value reverts back to undefined, but behaves as if no prop changes have occured.
Setting the prop to null seems to correct this issue, although it goes against type definitions.
Expected Behavior
Cursor behavior should revert back to default behavior once the cursor prop is unset.
Description
I set the
cursor
prop as eithercrosshair
orundefined
based on a boolean state. The cursor does not revert to its default behavior (grab interactions) once the prop value reverts back toundefined
, but behaves as if no prop changes have occured.Setting the prop to
null
seems to correct this issue, although it goes against type definitions.Expected Behavior
Cursor behavior should revert back to default behavior once the
cursor
prop is unset.Steps to Reproduce
https://codesandbox.io/s/react-map-gl-cursor-py2y4s
Environment
Logs
No response