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: enhance upload custom progress bar #24339

Merged

Conversation

morenyang
Copy link
Contributor

@morenyang morenyang commented May 21, 2020

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Perfermance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

  • fix progress bar type could be overridden
  • update demo

📝 Changelog

Language Changelog
🇺🇸 English fix progress bar type in upload could be overridden
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered components/upload/demo/customize-progress-bar.md

- fix progress bar `type` could be overridden
- update demo
@ant-design-bot
Copy link
Contributor

ant-design-bot commented May 21, 2020

components/upload/demo/customize-progress-bar.md Outdated Show resolved Hide resolved
components/upload/demo/customize-progress-bar.md Outdated Show resolved Hide resolved
@@ -177,7 +177,7 @@ export default class UploadList extends React.Component<UploadListProps, any> {
// show loading icon if upload progress listener is disabled
const loadingProgress =
'percent' in file ? (
<Progress type="line" {...progressProps} percent={file.percent} />
<Progress {...progressProps} type="line" percent={file.percent} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在 API 上注明一下吧,只支持 line

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

progressProps 的 ts 定义也可以把 type 和 percent 都 Omit 掉。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

progressProps 的 ts 定义也可以把 type 和 percent 都 Omit 掉。

already done in

export type UploadListProgressProps = Omit<ProgressProps, 'percent' | 'type'>;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

@morenyang morenyang requested review from xrkffgg and afc163 May 21, 2020 04:56
@xrkffgg xrkffgg merged commit b264589 into ant-design:feature May 21, 2020
@morenyang morenyang deleted the enhance-upload-custom-progress-bar branch May 21, 2020 09:32
@zombieJ zombieJ mentioned this pull request May 31, 2020
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants