Open manit-highlevel opened 2 months ago
If you don't inherit the node
parameter when customizing options, you should handle user events yourself. like this:
renderOption: ({
node,
option
}: {
node: VNode
option: DropdownOption | DropdownGroupOption
}) => {
return h('div', {
style: {
border: '1px solid red',
margin: '5px',
},
onClick: () => {
console.log('click', option.key)
}
}, option.key)
},
You can simulate as below, make sure your label renderer works as expected
node.props["onClick"]();
Describe the bug
When i render a plain div using render-option it
Steps to reproduce
Please refer to
Demo.vue
at this url https://codesandbox.io/p/sandbox/compassionate-aryabhata-tg9zwvLink to minimal reproduction
https://codesandbox.io/p/sandbox/compassionate-aryabhata-tg9zwv
System Info
Used Package Manager
yarn
Validations