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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support Transfer render #16026

Merged
merged 28 commits into from May 7, 2019
Merged

feat: Support Transfer render #16026

merged 28 commits into from May 7, 2019

Conversation

@zombieJ
Copy link
Member

@zombieJ zombieJ commented Apr 11, 2019

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

馃懟 What's the background?

ref: #14705

馃挕 Solution

Official support of customize list render

馃摑 Changelog

Transfer support children prop to customize render list.

鈽戯笍 Self Check before Merge

  • 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/transfer/demo/customize.md

@netlify
Copy link

@netlify netlify bot commented Apr 11, 2019

Deploy preview for ant-design ready!

Built with commit 2dcd604

https://deploy-preview-16026--ant-design.netlify.com

@afc163
Copy link
Member

@afc163 afc163 commented Apr 11, 2019

This pull request introduces 4 alerts when merging 00a507b into c4283eb - view on LGTM.com

new alerts:

  • 4 for Unused variable, import, function or class

Comment posted by LGTM.com

@todo
Copy link

@todo todo bot commented Apr 11, 2019

Remove this in next version.

// TODO: Remove this in next version.
handleLeftSelectAll = (filteredDataSource: TransferItem[], checkAll: boolean) =>
this.onSelectAll('left', filteredDataSource, !checkAll);
handleRightSelectAll = (filteredDataSource: TransferItem[], checkAll: boolean) =>
this.onSelectAll('right', filteredDataSource, !checkAll);


This comment was generated by todo based on a TODO comment in 52c6e97 in #16026. cc @ant-design.

@afc163
Copy link
Member

@afc163 afc163 commented Apr 11, 2019

This pull request introduces 4 alerts when merging 52c6e97 into c4283eb - view on LGTM.com

new alerts:

  • 4 for Unused variable, import, function or class

Comment posted by LGTM.com

@afc163
Copy link
Member

@afc163 afc163 commented Apr 11, 2019

This pull request introduces 3 alerts when merging 15ca3cb into c4283eb - view on LGTM.com

new alerts:

  • 3 for Unused variable, import, function or class

Comment posted by LGTM.com

@codecov
Copy link

@codecov codecov bot commented Apr 12, 2019

Codecov Report

Merging #16026 into feature will decrease coverage by 0.02%.
The diff coverage is 95.95%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #16026      +/-   ##
===========================================
- Coverage    95.23%   95.21%   -0.03%     
===========================================
  Files          251      252       +1     
  Lines         6773     6807      +34     
  Branches      1978     1946      -32     
===========================================
+ Hits          6450     6481      +31     
- Misses         322      324       +2     
- Partials         1        2       +1
Impacted Files Coverage 螖
components/transfer/ListItem.tsx 100% <酶> (酶)
components/transfer/renderListBody.tsx 100% <100%> (酶)
components/transfer/index.tsx 90.64% <92.59%> (-1.21%) 猬囷笍
components/transfer/list.tsx 93.75% <96.15%> (-0.44%) 猬囷笍

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 d54c3fa...2dcd604. Read the comment docs.

@zombieJ
Copy link
Member Author

@zombieJ zombieJ commented Apr 12, 2019

https://deploy-preview-16026--ant-design.netlify.com/components/transfer-cn/#components-transfer-demo-customize

鍙互 review 璧锋潵浜嗭紝鐪嬬湅 api 娌¢棶棰樻垜灏卞紑濮嬫悶鐢ㄤ緥浜嗭細https://github.com/ant-design/ant-design/pull/16026/files#diff-354b76c4434191794f8ee595d3cd16da

An enterprise-class UI design language and React-based implementation with a set of high-quality React components, one of best React UI library for enterprises
GitHub
馃 This is a ...

New feature
Bug fix
Site / document update
Component style update
TypeScript definition update
Refactoring
Code style optimization
Branch merge
Other (about what?)

馃懟 What...

@buildsize
Copy link

@buildsize buildsize bot commented Apr 22, 2019

File name Previous Size New Size Change
package-lock.json 822.87聽KB 821.95聽KB -946聽bytes (0%)

@afc163
Copy link
Member

@afc163 afc163 commented Apr 22, 2019

鏀规垚鐐瑰嚮琛岄夋嫨濡備綍锛屼笉鐒跺拰榛樿鐨勪緥瀛愪氦浜掍笉涓鑷淬

@zombieJ zombieJ marked this pull request as ready for review Apr 22, 2019
@zombieJ
Copy link
Member Author

@zombieJ zombieJ commented Apr 22, 2019

Update the test case. Please help to review.

@afc163
Copy link
Member

@afc163 afc163 commented Apr 23, 2019

渚嬪瓙閲屾悶涓涓 disabled 鐨 item 灏卞浜嗐

image

@afc163
Copy link
Member

@afc163 afc163 commented Apr 23, 2019

image

disabled 鐨勬椂鍊欎笉闇瑕 hover 鏁堟灉銆

@afc163
Copy link
Member

@afc163 afc163 commented Apr 23, 2019

鍜屼箣鍓嶇殑缁勪欢涓鏍凤紝浣犲彲浠ュ湪 demo 閲屽皝瑁呮垚涓涓 TransferTable 鏉ヨ皟鐢ㄣ

components/transfer/list.tsx Outdated Show resolved Hide resolved
components/transfer/list.tsx Show resolved Hide resolved
components/transfer/list.tsx Outdated Show resolved Hide resolved
@chenshuai2144
Copy link
Contributor

@chenshuai2144 chenshuai2144 commented Apr 23, 2019

TransferList 鐨 searchPlaceholder锛宯otFoundContent 锛宨temsUnit锛 itemUnit 锛宱nScroll锛 direction
閮芥槸蹇呭~椤癸紝鏄巻鍙查仐鐣欓棶棰樸備竴璧锋敼鎺夊惂

@afc163 afc163 mentioned this pull request Apr 23, 2019
13 tasks
@zombieJ
Copy link
Member Author

@zombieJ zombieJ commented Apr 23, 2019

@zombieJ
Copy link
Member Author

@zombieJ zombieJ commented Apr 25, 2019

Update the TreeTransfer Demo, please check again.

afc163
afc163 approved these changes May 7, 2019
@zombieJ zombieJ merged commit 543b620 into feature May 7, 2019
30 checks passed
@todo todo bot mentioned this pull request May 7, 2019
@delete-merged-branch delete-merged-branch bot deleted the transfer-render branch May 7, 2019

### Render Props

New in 3.17.0. Transfer accept `children` to customize render list, using follow props:
Copy link
Member

@afc163 afc163 May 7, 2019

閿欒繃绔欎簡

Copy link
Member Author

@zombieJ zombieJ May 7, 2019

馃槩 鎴戞洿鏂颁竴涓嬨

@zombieJ zombieJ mentioned this pull request May 16, 2019
1 task
@andyyxw
Copy link

@andyyxw andyyxw commented Jul 18, 2019

@zombieJ 杩欐鏇存柊鍚庯紝Transferref 鏆撮湶鍑虹殑鏂规硶閮界敤涓嶄簡浜嗐
姣斿 鎴戣鍦ㄥ叾浠栫粍浠惰Е鍙 TransferhandleFilter 鏉ヨ繘琛屾悳绱€

@zombieJ
Copy link
Member Author

@zombieJ zombieJ commented Jul 19, 2019

@andyyxw, handleFilter 鏄唴閮ㄦ柟娉曪紝涓嶅簲璇ラ氳繃 ref 鍘昏皟鐢ㄣ傚鏋滄湁杩欑被闇姹傦紝鍙互鏉ヤ釜 PR 鎶 search 鍙樻垚鍙楁帶灞炴с

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants