diff --git a/src/utils/nodeUtil.tsx b/src/utils/nodeUtil.tsx
index 4be4d599..4b055c81 100644
--- a/src/utils/nodeUtil.tsx
+++ b/src/utils/nodeUtil.tsx
@@ -30,7 +30,7 @@ function convertItemsToNodes(
// Group
return (
- {convertItemsToNodes(children, components)}
+ {convertItemsToNodes(children, components, prefixCls)}
);
}
@@ -38,7 +38,7 @@ function convertItemsToNodes(
// Sub Menu
return (
- {convertItemsToNodes(children, components)}
+ {convertItemsToNodes(children, components, prefixCls)}
);
}
diff --git a/tests/MenuItem.spec.tsx b/tests/MenuItem.spec.tsx
index c028f003..d5cc0d12 100644
--- a/tests/MenuItem.spec.tsx
+++ b/tests/MenuItem.spec.tsx
@@ -206,5 +206,27 @@ describe('MenuItem', () => {
expect(container.querySelector('li')).toMatchSnapshot();
});
+
+ it('should set extra to group option', () => {
+ const { container } = render(
+
,
+ );
+
+ expect(container.querySelector('li')).toMatchSnapshot();
+ });
});
});
diff --git a/tests/__snapshots__/MenuItem.spec.tsx.snap b/tests/__snapshots__/MenuItem.spec.tsx.snap
index 5b876969..351ed487 100644
--- a/tests/__snapshots__/MenuItem.spec.tsx.snap
+++ b/tests/__snapshots__/MenuItem.spec.tsx.snap
@@ -1,5 +1,38 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`MenuItem overwrite default role should set extra to group option 1`] = `
+
+`;
+
exports[`MenuItem overwrite default role should set extra to option 1`] = `