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

fix: The display of disabled subNavItem in vertical Navigation is not as expected when it is collapsed #2637

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/semi-ui/navigation/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export default class NavItem extends BaseComponent<NavItemProps, NavItemState> {
return (
<Tooltip
content={text}
wrapWhenSpecial={false}
position="right"
trigger={'hover'}
mouseEnterDelay={showDelay}
Expand Down
39 changes: 39 additions & 0 deletions packages/semi-ui/navigation/_story/navigation.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,4 +352,43 @@ PopupDemo.story = {
export const CustomArrowIconDemo = () => <CustomArrowIcon></CustomArrowIcon>
CustomArrowIconDemo.story = {
name: 'CustomArrowIcon'
}


class DisabledSub extends React.Component {
render() {
return (
<Nav
style={{ height: 520 }}
bodyStyle={{ height: 300 }}
items={[
{
text: '任务平台',
itemKey: '1',
icon: <IconMail />,
items: [{
text: '任务平台1',
disabled: true,
itemKey: '11',
items: ['任务1管理', '用户2任务查询'],
}, {
text: '任务平台2',
disabled: true,
itemKey: '12',
items: ['任务11管理', '用户22任务查询'],
}],
},
]}
onSelect={key => console.log(key)}
footer={{
collapseButton: true,
}}
/>
);
}
}

export const DisabledSubDemo = () => <DisabledSub></DisabledSub>
DisabledSubDemo.story = {
name: 'DisabledSubDemo'
}
Loading