Skip to content

Commit 02bad65

Browse files
committed
feat: update code
1 parent 18cb788 commit 02bad65

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

docs/examples/items.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default () => (
2323
),
2424
},
2525
{
26-
key: 'ToOriginNode',
26+
key: 'ToOriginNode1',
2727
label: 'SubMenu',
2828
render: (_originNode, item) => <p>item: extra: {JSON.stringify(item)}</p>,
2929
},

src/interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface ItemSharedProps {
66
ref?: React.Ref<HTMLLIElement | null>;
77
style?: React.CSSProperties;
88
className?: string;
9-
render?: (originalNode: React.ReactNode, item: ItemType) => React.ReactNode;
9+
render?: (originalNode: React.ReactNode, item: NonNullable<ItemType>) => React.ReactNode;
1010
}
1111

1212
export interface SubMenuType extends ItemSharedProps {

tests/MenuItem.spec.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ describe('MenuItem', () => {
257257

258258
const link = container.querySelector('a');
259259
expect(link).toHaveAttribute('href', 'https://ant.design');
260-
261260
expect(container.querySelector('#upload')).toHaveTextContent('extra');
262261
});
263262
});

0 commit comments

Comments
 (0)