Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More than one menu items selected even if selectedKey has only one element in array #337

Open
karthik-hr opened this issue Sep 8, 2020 · 0 comments

Comments

@karthik-hr
Copy link

karthik-hr commented Sep 8, 2020

Im using antd latest version.

<Menu
	inlineIndent={8}
	theme="dark"
	mode="inline"
	selectedKeys={['roomtypes']}
	>
		<Menu.Item key={'roomtypes'}>Roomtypes</Menu.Item>	
		<Menu.Item key={'roomtypesOffset'}>Roomtypes Offset</Menu.Item>	
</Menu>

file: https://github.com/react-component/menu/blob/master/src/MenuItem.tsx
isSelected: selectedKeys.indexOf(eventKey) !== -1,

Here isSelected true for both eventKey roomtypes and roomtypesOffset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant