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

Transfer support onSearch #12422

Merged
merged 6 commits into from Oct 12, 2018

Conversation

Projects
None yet
4 participants
@zombieJ
Member

zombieJ commented Sep 26, 2018

ref: #12410

zombieJ added some commits Sep 26, 2018

@zombieJ zombieJ requested review from yesmeck and afc163 Sep 26, 2018

@ant-design-bot

This comment has been minimized.

ant-design-bot commented Sep 26, 2018

Deploy preview for ant-design ready!

Built with commit 0ca129e

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

if (onSearchChange) {
if (!onSearchChangeWarned) {
onSearchChangeWarned = true;
warning(

This comment has been minimized.

@yesmeck

yesmeck Sep 27, 2018

Member

这个 warning 就是只显示一次的

if (this.props.onSearchChange) {
this.props.onSearchChange(direction, e);
if (onSearchChange) {
warning(

This comment has been minimized.

@yesmeck

yesmeck Sep 30, 2018

Member

应该在 constructor 里就 warning

This comment has been minimized.

@zombieJ

zombieJ Oct 2, 2018

Member

constructor 里如果没有传,之后传。这就漏了。

const myProps = {};

if (inited) {
  myProps.onSearchChange = () => null;
}

return <Transfer {...myProps} />
@afc163

This comment has been minimized.

Member

afc163 commented Oct 11, 2018

修复一下 ci ?

@zombieJ

This comment has been minimized.

Member

zombieJ commented Oct 11, 2018

merged feature branch. Pls check.

@codecov

This comment has been minimized.

codecov bot commented Oct 11, 2018

Codecov Report

Merging #12422 into feature will increase coverage by 0.15%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #12422      +/-   ##
===========================================
+ Coverage    92.37%   92.53%   +0.15%     
===========================================
  Files          213      213              
  Lines         5549     5557       +8     
  Branches      1559     1600      +41     
===========================================
+ Hits          5126     5142      +16     
+ Misses         419      409      -10     
- Partials         4        6       +2
Impacted Files Coverage Δ
components/transfer/index.tsx 89.8% <100%> (+1.88%) ⬆️
components/time-picker/index.tsx 81.96% <0%> (ø) ⬆️
components/transfer/list.tsx 86.31% <0%> (+2.1%) ⬆️
components/transfer/search.tsx 100% <0%> (+23.52%) ⬆️

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 965fd23...695fef6. Read the comment docs.

@afc163

This comment has been minimized.

Member

afc163 commented Oct 11, 2018

补个用例?

@zombieJ

This comment has been minimized.

Member

zombieJ commented Oct 12, 2018

done

'`onSearchChange` in Transfer is deprecated. Please use `onSearch` instead.',
);
onSearchChange(direction, e);
}

This comment has been minimized.

@afc163

afc163 Oct 12, 2018

Member

onSearchChange 的 warning 和兼容性也可以测一下。

This comment has been minimized.

@zombieJ

zombieJ Oct 12, 2018

Member

有道理 👍

This comment has been minimized.

@afc163

afc163 Oct 12, 2018

Member

主要是覆盖率的 hits 没有达标,现在估计 100% 了。

@afc163 afc163 merged commit ca080ac into feature Oct 12, 2018

18 checks passed

WIP ready for review
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 92.37%)
Details
codecov/project 92.53% (+0.15%) compared to 965fd23
Details
security/snyk - package.json (paranoidjk) No new issues
Details

@afc163 afc163 deleted the transSearch branch Oct 12, 2018

kimochg added a commit to kimochg/ant-design that referenced this pull request Nov 8, 2018

Transfer support onSearch (ant-design#12422)
* add onSearch

* add warning

* update doc

* add test case

* add legacy onSearchChange test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment