Open jingchen233 opened 7 months ago
code blob like below:
const menu = [ {key: '0', label: 'Item 1flshgslhgslhglshg', disabled: true}, {key: '1', label: 'Item 2', checked: true}, {key: '2', label: 'Item 3'}];
<Menu multiple={true} selectedKeys={selectedKeys} onSelect={onMenuSelect} onDeselect={onMenuDeSelect}
{ menu.map((item) => { return <checkbox checked={item?.checked || false} disabled={item.disabled} label={item.label} /> }
problems: when I click checkbox, it will call both onSelect and onDeselect.
code blob like below:
const menu = [ {key: '0', label: 'Item 1flshgslhgslhglshg', disabled: true}, {key: '1', label: 'Item 2', checked: true}, {key: '2', label: 'Item 3'}];
<Menu multiple={true} selectedKeys={selectedKeys} onSelect={onMenuSelect} onDeselect={onMenuDeSelect}
problems: when I click checkbox, it will call both onSelect and onDeselect.