ant-design / ant-design/pro-components

Drawer 打开一个很卡的页面,会卡住没有任何反应需要子页面渲染完了才会展开。

Open
#8,723 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### Reproduction link

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/react-jjjnee?file=vars.tsx,demo.tsx,package.json)

### Steps to reproduce

点击open按钮,大概过个3秒才会展开

### What is expected?

可以先展开drawer然后里面loading,渲染好了后再展示内容。

### What is actually happening?

卡住了

| Environment | Info |
| --- | --- |
| antd | 5.20.5 |
| React | 18.3.1 |
| System | windows |
| Browser | chrome版本 113.0.5672.127(正式版本) (64 位) |

---
如果使用自带loading属性,貌似也是设置了false后子组件才会真正开始渲染,时间还是不变的

Contributor guide

Open the contributing guide

Research direction

Start by running the StackBlitz reproduction and reading demo.tsx, vars.tsx, and package.json. Trace the Drawer opening behavior when the nested page takes several seconds to render, including the loading prop case. Done means the Drawer opens promptly, shows loading while needed, and displays the content after rendering completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.