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

feat: Breadcrumb support breadcrumbRender #28999

Merged
merged 2 commits into from
Jan 24, 2021
Merged

feat: Breadcrumb support breadcrumbRender #28999

merged 2 commits into from
Jan 24, 2021

Conversation

chenshuai2144
Copy link
Contributor

@chenshuai2144 chenshuai2144 commented Jan 23, 2021

[中文版模板 / Chinese template]

🤔 This is a ...

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

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Breadcrumb support breadcrumbRender
🇨🇳 Chinese Breadcrumb 支持 breadcrumbRender 属性

☑️ 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/page-header/index.en-US.md
View rendered components/page-header/index.zh-CN.md

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jan 23, 2021

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 23, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 99a12a8:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Jan 23, 2021

Codecov Report

Merging #28999 (99a12a8) into feature (f010664) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           feature    #28999   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          393       393           
  Lines         7460      7465    +5     
  Branches      2089      2152   +63     
=========================================
+ Hits          7460      7465    +5     
Impacted Files Coverage Δ
components/page-header/index.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f010664...99a12a8. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2021

Size Change: +31 B (0%)

Total Size: 789 kB

Filename Size Change
./dist/antd-with-locales.min.js 313 kB +16 B (0%)
./dist/antd.min.js 274 kB +15 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/antd.compact.min.css 66.9 kB 0 B
./dist/antd.dark.min.css 68.2 kB 0 B
./dist/antd.min.css 66.9 kB 0 B

compressed-size-action

@afc163 afc163 merged commit 91c22a1 into feature Jan 24, 2021
@afc163 afc163 deleted the Breadcrumb branch January 24, 2021 09:44
@afc163
Copy link
Member

afc163 commented Jan 24, 2021

changelog 误导我,明明是 PageHeader 新增 breadcrumbRender 属性。

@vilien
Copy link

vilien commented Jan 25, 2021

This feature conflicts with pro-layout as https://github.com/ant-design/pro-components/blob/5c8ecfa5ad36a558315089455d4e29dc22aa8b3c/packages/layout/src/BasicLayout.tsx#L59

@xiaoxiangmoe
Copy link

xiaoxiangmoe commented Jan 27, 2021

@chenshuai2144 @afc163 能让让 breadcrumb 渲染 jsx 吗?举个例子

我是想用展示

<PageHeader
  breadcrumb = {<div>{id ?? name}</div>}
/>

数据刚刚拿到时候只有 id,然后根据 id 去请求得到 name。这些 data 都是随着每次 render 会变化的。


目前的话,只有 breadcrumb 属性变化了,才会重新渲染 breadcrumbRender

@chenshuai2144
Copy link
Contributor Author

应该不会的 breadcrumb 没做 memo,应该每次 render 都会执行一遍

@xiaoxiangmoe
Copy link

@chenshuai2144 抱歉,我复现不出问题了

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.

5 participants