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: wrappig index param #739

Merged
merged 3 commits into from Apr 14, 2022

Conversation

nieyuyao
Copy link
Contributor

@nieyuyao nieyuyao commented Apr 12, 2022

@vercel
Copy link

vercel bot commented Apr 12, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/select/AMfNenaXNPQDwpjaS7fHqLVeVXDk
✅ Preview: https://select-git-fork-nieyuyao-fix-scrollintov-b12155-react-component.vercel.app

@nieyuyao nieyuyao changed the title fix: wrappig index param wip: fix: wrappig index param Apr 12, 2022
@afc163
Copy link
Member

afc163 commented Apr 12, 2022

来个用例。

@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #739 (18e8f47) into master (1d77385) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #739   +/-   ##
=======================================
  Coverage   99.50%   99.50%           
=======================================
  Files          25       25           
  Lines        1013     1013           
  Branches      320      321    +1     
=======================================
  Hits         1008     1008           
  Misses          4        4           
  Partials        1        1           
Impacted Files Coverage Δ
src/OptionList.tsx 99.29% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@nieyuyao nieyuyao changed the title wip: fix: wrappig index param fix: wrappig index param Apr 13, 2022
@afc163
Copy link
Member

afc163 commented Apr 13, 2022

https://github.com/react-component/select/pull/728/files#diff-72ec48c7788c5c428904bee5501e48f2f6ddcd678eb89dc03788715c14452860R71 这里改出来的问题。最好这里直接加个判断:

       listRef.current.scrollTo(typeof args === 'number' ? { index: args } : args);

afc163 referenced this pull request Apr 13, 2022
* Fix: fix scroll params

[issue-link](ant-design/ant-design#34468)

* Chore: add unit test for scroll config type params
@afc163
Copy link
Member

afc163 commented Apr 13, 2022

scrollIntoView 几处调用就不动了。

@afc163 afc163 merged commit 1ee1eb2 into react-component:master Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants