Skip to content

Commit 1390a2f

Browse files
taimoorgitvkbansal
authored andcommitted
Updated README.md with a warning (#303)
* Updated README.md with a warning I spent a lot of time debugging the `onClick` for `MenuItem` and after trying again and again I found in the issue tracker a comment explaining that every single instance of `ContextMenu` and `ContextMenuTrigger` needs to have a unique `id` they cannot share one even if they are the same component or use the same menu. I think this a good change to make to the docs since it's very small and can help people prevent people from wasting time debugging. Thank you for your time. * Update README.md
1 parent 378c113 commit 1390a2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function MyApp() {
6161
return (
6262
<div>
6363

64-
<ContextMenuTrigger id="some_unique_identifier">
64+
<ContextMenuTrigger id="some_unique_identifier"> {/* NOTICE: id must be unique for EVERY instance */}
6565
<div className="well">Right click to see the menu</div>
6666
</ContextMenuTrigger>
6767

0 commit comments

Comments
 (0)