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

fix: Select should trigger onSearch when search input is empty #16235

Merged
merged 2 commits into from Apr 22, 2019

Conversation

Projects
None yet
4 participants
@zombieJ
Copy link
Member

commented Apr 22, 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?

fix #16223

馃挕 Solution

update rc-select

馃摑 Changelog

Fix Select not trigger onSearch when input is empty

鈽戯笍 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/select/demo/search.md

zombieJ added some commits Apr 22, 2019

@pr-triage pr-triage bot added the PR: unreviewed label Apr 22, 2019

@netlify

This comment has been minimized.

Copy link

commented Apr 22, 2019

Deploy preview for ant-design ready!

Built with commit b48be3e

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

@codecov

This comment has been minimized.

Copy link

commented Apr 22, 2019

Codecov Report

Merging #16235 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16235      +/-   ##
==========================================
+ Coverage   95.26%   95.31%   +0.04%     
==========================================
  Files         252      252              
  Lines        6741     6741              
  Branches     1950     1927      -23     
==========================================
+ Hits         6422     6425       +3     
+ Misses        318      315       -3     
  Partials        1        1
Impacted Files Coverage 螖
components/_util/wave.tsx 88.46% <0%> (+2.88%) 猬嗭笍

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 aab2693...b48be3e. Read the comment docs.

@zombieJ zombieJ merged commit d1fa211 into master Apr 22, 2019

30 of 32 checks passed

Header rules No header rules processed
Details
Pages changed 215 new files uploaded
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
CodeFactor No issues found.
Details
DEP All dependencies are resolved
LGTM analysis: JavaScript No new or fixed alerts
Details
License Compliance All checks passed.
Details
Mixed content No mixed content detected
Details
Redirect rules 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No significant change
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
codebeat 5 issues resolved and 1 introduced
Details
codecov/patch Coverage not affected when comparing aab2693...b48be3e
Details
codecov/project 95.31% (+0.04%) compared to aab2693
Details
deploy/netlify Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No new issues
Details

@pr-triage pr-triage bot removed the PR: unreviewed label Apr 22, 2019

@delete-merged-branch delete-merged-branch bot deleted the select-onSearch branch Apr 22, 2019

@pr-triage pr-triage bot added the PR: merged label Apr 22, 2019

@avtpas

This comment has been minimized.

Copy link

commented Apr 29, 2019

杩欐槑鏄庡氨鎴愪簡bug鍟婏紝浜у搧濂藉鍦版柟棰濆瑙︽硶search => 瀵艰嚧options琚洿鏂 => 瀵艰嚧鎵閫変笉瀛樺湪

鏂囨。閲屽苟娌℃湁鎻愬埌onBlur浼氳Е娉晄earch锛 鑰屼笖杩欎釜issue鐨勬爣棰樺拰浣犱滑realeaselog涓婇潰瀵瑰簲鐨勯」鐩牴鏈啓鐨勪笉鏄悓涓涓簨鎯呫

澶笉璐熻矗浜, 璇峰敖蹇瓟澶

@afc163

This comment has been minimized.

Copy link
Member

commented Apr 29, 2019

@avtpas 鐪嬩笅 #16223 锛屾垨璁稿彲浠ュ拰 @jinboker 璁ㄨ涓嬶紵

@avtpas

This comment has been minimized.

Copy link

commented Apr 29, 2019

@avtpas 鐪嬩笅 https://github.com/ant-design/ant-design/issues/16223锛屾垨璁稿彲浠ュ拰 @jinboker 璁ㄨ涓嬶紵

杩欎釜鏀瑰姩锛屼笉鏄畝鍗曠殑bug淇锛屽洜涓鸿繖涓苟涓嶇畻bug锛屾垜鍚屾剰16235鐨勫仛娉曪紝input涓虹┖娌℃湁瑙︽硶search灞炰簬bug锛屼絾鏄瑙i噴涓嬩负浠涔堣閫氳繃blur鍘昏Е娉昽nsearch?
姣斿鍒氬垰鎴戜笂闈㈡彁鍒扮殑鍦烘櫙锛
1, select鐨勫閫夊垪琛ㄩ氳繃search寰楀埌
2, 閫夊彇鍏朵腑涓涓夐」閫氳繃瑙﹀彂onchange鑾峰緱鏁版嵁
3, 姝ゆ椂鎮勬倓缁欐垜瑙﹀彂涓涓猻earch锛 鑰屼笖鎼滅储鍐呭涓虹┖锛屼細寰楀埌涓涓柊鐨刲ist浣滀负鎴戠殑澶囬夐」
4, 濡傛灉鏂扮殑鍒楄〃閲屾病鏈夋垜鍒氬垰閫夋嫨鐨勯」鐩紝閭f垜鍒氬垰閫夋嫨鐨勬暟鎹紝灏辨秷澶变簡!! 娑堝け浜!!

闅鹃亾杩欎笉鎵嶇畻鏄痓ug涔堬紵

@jinboker

This comment has been minimized.

Copy link

commented Apr 29, 2019

@avtpas 鎴戣涓嬫垜鎻愯繖涓猧ssues鐨勫師鍥狅細杈撳叆鍐呭鎼滅储鍚庯紝鐐瑰嚮涓嬫媺妗嗗锛屼娇涓嬫媺妗嗚鍏抽棴锛岃繖涓椂鍊欎細娓呯┖鎼滅储妗嗭紝鍚屾椂onSearch骞朵笉浼氳瑙﹀彂锛岃繖涓椂鍊欏啀focus锛屼笅鎷夐」杩樻槸涔嬪墠宸茬粡鎼滅储杩囩殑鍐呭

鐜板湪瑙夊緱鎴戜咯璇寸殑涓滆タ搴旇鎷嗘垚涓や釜闂鏉ョ湅

@avtpas

This comment has been minimized.

Copy link

commented Apr 29, 2019

@avtpas 鎴戣涓嬫垜鎻愯繖涓猧ssues鐨勫師鍥狅細杈撳叆鍐呭鎼滅储鍚庯紝鐐瑰嚮涓嬫媺妗嗗锛屼娇涓嬫媺妗嗚鍏抽棴锛岃繖涓椂鍊欎細娓呯┖鎼滅储妗嗭紝鍚屾椂onSearch骞朵笉浼氳瑙﹀彂锛岃繖涓椂鍊欏啀focus锛屼笅鎷夐」杩樻槸涔嬪墠宸茬粡鎼滅储杩囩殑鍐呭

鐜板湪瑙夊緱鎴戜咯璇寸殑涓滆タ搴旇鎷嗘垚涓や釜闂鏉ョ湅

纭疄鏄袱涓棶棰樺晩锛屼笉鍐茬獊锛屼綘鎻愮殑閭d釜纭疄鏄痓ug锛屾垜涓婇潰鎻愬埌浜嗭紝鍙笉杩囩幇鍦ㄧ殑澶勭悊鏂瑰紡锛屽鑷翠簡鏂扮殑涓嶅悎鐞嗘ug銆

@jinboker

This comment has been minimized.

Copy link

commented Apr 29, 2019

@avtpas 鎴戣涓嬫垜鎻愯繖涓猧ssues鐨勫師鍥狅細杈撳叆鍐呭鎼滅储鍚庯紝鐐瑰嚮涓嬫媺妗嗗锛屼娇涓嬫媺妗嗚鍏抽棴锛岃繖涓椂鍊欎細娓呯┖鎼滅储妗嗭紝鍚屾椂onSearch骞朵笉浼氳瑙﹀彂锛岃繖涓椂鍊欏啀focus锛屼笅鎷夐」杩樻槸涔嬪墠宸茬粡鎼滅储杩囩殑鍐呭
鐜板湪瑙夊緱鎴戜咯璇寸殑涓滆タ搴旇鎷嗘垚涓や釜闂鏉ョ湅

纭疄鏄袱涓棶棰樺晩锛屼笉鍐茬獊锛屼綘鎻愮殑閭d釜纭疄鏄痓ug锛屾垜涓婇潰鎻愬埌浜嗭紝鍙笉杩囩幇鍦ㄧ殑澶勭悊鏂瑰紡锛屽鑷翠簡鏂扮殑涓嶅悎鐞嗘ug銆

鍡紝鎴戜笂闈㈤偅鏉″洖澶嶅熀鏈笂鏄窡浣犲悓鏃跺彂鍑虹殑浜嗭紝鍐欑殑鏃跺欒繕娌$湅鍒颁綘涓婇潰閭f潯鍐呭

@afc163

This comment has been minimized.

Copy link
Member

commented Apr 29, 2019

鏄悓涓涓棶棰橈紝鐐瑰嚮涓嬫媺妗嗗浣夸笅鎷夊叧闂殑琛屼负浼氳Е鍙戞悳绱㈡鐨勬竻绌猴紝姝ゆ椂濡傛灉涓嶈Е鍙 onSearch锛屽氨浼氬鑷 #16223 鐨勯棶棰樸

@avtpas

This comment has been minimized.

Copy link

commented Apr 29, 2019

鏄悓涓涓棶棰橈紝鐐瑰嚮涓嬫媺妗嗗浣夸笅鎷夊叧闂紝浼氳Е鍙戞悳绱㈡鐨勬竻绌猴紝姝ゆ椂濡傛灉涓嶈Е鍙 onSearch 鍙樺寲锛屽氨浼氬鑷 #16223 鐨勯棶棰樸

鎵浠ュ拫鍔烇紵鎴戦渶瑕佸啀鎻愪釜issuse鏄箞锛
鍏跺疄鍚堢悊鎬у垽鏂緢绠鍗曪紝鎴戝仛涓涓畝鍗曠殑鎿嶄綔锛 杈撳叆鍏抽敭瀛=>鎼滅储=>閫夋嫨. 鏁翠釜杩囩▼鍒拌繖灏辩粨鏉熶簡锛屼负浠涔堣繕瑕佺粰鎴戝啀鎼滅储涓娆★紵鑰屼笖鍏抽敭瀛楄繕鏄┖锛屾垜瑙夊緱浣犱滑鑲畾杩樿兘鎯冲埌鏇村ソ鐨勫姙娉曞惂

@afc163

This comment has been minimized.

Copy link
Member

commented Apr 29, 2019

杩欎釜閫昏緫锛屾甯告悳绱㈢殑閫夋嫨閫昏緫鍚庨潰鍐嶈窡涓涓 onSearch锛屼篃纭疄寰堝鎬紝blur 鐨勬椂鍊欏彲浠ヨ search input 宸茬粡閿姣佷簡锛岃Е鍙 onSearch 鐨勬剰涔変篃涓嶅ぇ浜嗐

杩欎箞鐪嬫潵杩樻槸瑕佸洖婊氳繖涓慨澶嶏紝@jinboker @zombieJ 鐪嬪浣曪紵

@jinboker

This comment has been minimized.

Copy link

commented Apr 29, 2019

閭f湁娌℃湁浠涔堝姙娉曞湪鎴戞彁鍒扮殑閭d釜鍦烘櫙涓嬬煡鏅撹緭鍏ユ琚竻绌猴紵

涓昏鏄垜杩欒竟鎼滅储鐨勪笅鎷夋閲岄潰鏄湁鍒濆鍖栭夐」鐨勶紝onSearch鍦ㄦ垜鎻愬埌鐨勫満鏅笅涓嶈Е鍙戯紝鍙兘缁欑敤鎴烽犳垚鍥版儜

浠わ細鍥炴粴鎴戣禐鍚岋紝鍥犱负 @avtpas 鎻愬埌鐨勯棶棰樻垜杩欒竟涔熷悓鏍蜂細瑙﹀彂锛屼袱鑰呯浉姣旇緝杩樻槸杩欎釜闂澶т竴鐐

@zombieJ

This comment has been minimized.

Copy link
Member Author

commented Apr 29, 2019

鎴戣寰楀簲璇ヨ繖鏍凤細

  1. onChange 鐨勬椂鍊欐竻绌 input 涓嶈Е鍙 onSearch
  2. onBlur 鍒犻櫎 input 鐨勬椂鍊欒Е鍙 onSearch
@avtpas

This comment has been minimized.

Copy link

commented Apr 29, 2019

鎴戣寰楀簲璇ヨ繖鏍凤細

  1. onChange 鐨勬椂鍊欐竻绌 input 涓嶈Е鍙 onSearch
  2. onBlur 鍒犻櫎 input 鐨勬椂鍊欒Е鍙 onSearch

閭f槸涓嶆槸搴旇鍔犱釜閿侊紝涓嶇劧onChange蹇呯劧缁у彂onBlur鍚э紵

@zombieJ

This comment has been minimized.

Copy link
Member Author

commented Apr 29, 2019

鍡紝浼氬鐞嗘帀鐨勩

@avtpas

This comment has been minimized.

Copy link

commented Apr 29, 2019

鍡紝浼氬鐞嗘帀鐨勩

鎰熻阿鍚勪綅锛屾寔缁叧娉╥ssue锛屾湡寰呮棭鏃ヤ笂绾裤

@zombieJ

This comment has been minimized.

Copy link
Member Author

commented Apr 30, 2019

rc-select@9.1.1 is updated, you can reinstall node_modules and retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.