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

[BUG] <Anchor> Anchor组件如果初始用display: none隐藏,后面用户点击时再展示出来,会导致左边的灰色滑轨不展示 #2398

Open
1 task done
DaiQiangReal opened this issue Aug 6, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@DaiQiangReal
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

Anchor

Semi Version

latest

Current Behavior

Anchor组件如果初始用display: none隐藏,后面用户点击时再展示出来,会导致左边的灰色滑轨不展示

Expected Behavior

显示

Steps To Reproduce

No response

ReproducibleCode

import React from 'react';
import { Anchor, Button } from '@douyinfe/semi-ui';
() => {
    const [show, setShow] = useState(false);
    return (
        <>
            <Button onClick={() => setShow(true)}>Click</Button>
            <Anchor style={show ? {} : { display: 'none' }}>
                <Anchor.Link href="#基本示例" title="基本示例" />
                <Anchor.Link href="#组件" title="组件" />
                <Anchor.Link href="#设计语言" title="设计语言" />
                <Anchor.Link href="#物料平台" title="物料平台" />
                <Anchor.Link href="#主题商店" title="主题商店" />
            </Anchor>
        </>
    );
};

Environment

- OS:
- browser:

Anything else?

Oncall 5353561

@pointhalo pointhalo added bug Something isn't working good first issue Good for newcomers labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants