[x] The Build process is done without errors. All tests pass in the /lib directory.
[x] Self-reviewed the code before submitting.
[x] Meets accessibility standards.
[x] Added/updated documentation to /website as needed.
[x] Added/updated tests as needed.
Description
In the previous weeks, we have been working on a new component, the DxcContextualMenu. During its development, a new need arose: adding groups to the component, which can contain single elements or other groups.
To implement this new functionality we had to use a recursive algorithm to optimize the rendering of nested components up to N level. This had a few consequences for the component API:
defaultSelectedItemIndex has been removed. The default selection employing an index became more complex with the inclusion of groups.
No more icons in the slot position. Now you can only place a badge on the right side of an item.
The component no longer exports a Badge. The user should use the regular DxcBadge as the value of the prop with the same name.
Checklist
/lib
directory./website
as needed.Description In the previous weeks, we have been working on a new component, the
DxcContextualMenu
. During its development, a new need arose: adding groups to the component, which can contain single elements or other groups.To implement this new functionality we had to use a recursive algorithm to optimize the rendering of nested components up to N level. This had a few consequences for the component API:
defaultSelectedItemIndex
has been removed. The default selection employing an index became more complex with the inclusion of groups.DxcBadge
as the value of the prop with the same name.The design can be checked here.