Component: PanelMenu -> Template, how to set options.OnClick in menu items #3666
Unanswered
bbest1
asked this question in
PrimeReact
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all
I wanted to use component PanelMenu -> Template. Buy how to set parameter "options" and OnClick event?
If run this code:
template: (item, options) => itemRenderer(item, { onClick: console.log("123"), items: options.items }),
Then console.log("123") calls several time per click.
But in this approach:
command: () => { console.log("567"); },
calls only once and this is right.
So how pass options argument to itemRenderer function?
Beta Was this translation helpful? Give feedback.
All reactions