-
Notifications
You must be signed in to change notification settings - Fork 42
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
v3: Menu is using ListItem #1295
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
); | ||
|
||
return React.cloneElement<MenuItemProps>(menuItem, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the original reason for using cloneElement
here was for adding extra stuff to menuItem returned by custom itemRenderer
.
so if we're removing it, there needs to be a way to expose equivalent functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking if we need to remove this cloneElement statement?
Reverted changes for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's ok to keep for now because we are not passing className
inside it. we can try to figure out a better solution in the future
Co-authored-by: Mayank <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes
Using
ListItem
inside ofMenuItem
;Updated code to use new MenuItem inside ComboBox and Select;
Updated CSS tests for Menu;
Renamed MenuItem props:
MenuItemSkeleton is still using some menu-item class stuff;
TODO:
Removed some of the cloneObject code
Testing
Visual tests pass;
Updated unit tests for new classnames;
Docs
https://github.com/iTwin/iTwinUI/wiki/iTwinUI-react-v3-migration-guide#menuitem