auth0/cosmos

onItemClick throws error if not defined

cristiandouce opened this issue · 1 comments

Describe the bug
When defining a <ResourceList>, if the prop onItemClick is not defined, it throws an error of sorts:

Uncaught TypeError: onItemClick is not a function

meaning it's trying to call it somewhere within cosmos, despite it wasn't provided.

Expected behavior
Not to throw 😄

Screenshots
image

Where s is the onItemClick named function minified for production.

Cosmos version:
Latests. It even throws in the current docs site.

Additional context
Code that reproduces the bug, on the playground of cosmos