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

docs: fix auto complete demo #20946

Merged
merged 3 commits into from
Jan 17, 2020
Merged

docs: fix auto complete demo #20946

merged 3 commits into from
Jan 17, 2020

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Jan 16, 2020

🤔 This is a ...

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

🔗 Related issue link

close #20930

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ 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/auto-complete/demo/certain-category.md
View rendered components/auto-complete/demo/uncertain-category.md

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jan 16, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 16, 2020

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 061ab02:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Jan 17, 2020

Codecov Report

Merging #20946 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #20946   +/-   ##
=======================================
  Coverage   97.47%   97.47%           
=======================================
  Files         296      296           
  Lines        6901     6901           
  Branches     1915     1916    +1     
=======================================
  Hits         6727     6727           
  Misses        174      174

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 a46c0c3...061ab02. Read the comment docs.

<input
aria-activedescendant="undefined_list_0"
aria-autocomplete="list"
aria-controls="undefined_list"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在真实场景里面是 rc-select, @zombieJ 来看看有什么问题?

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID 是通过 useEffect 生成的。demo test 里用的 render 所以 FC 第一次的 snapshot 是没有这个值的。用 mount 就会出现值。这里故意这么设计,以防止自增 id 在 ssr 的时候永远对不上,只会在 client 端生成。

https://github.com/react-component/select/blob/e3180ccd1db45d9a26265c3219c6b981e869fa70/src/generate.tsx#L346

@zombieJ zombieJ merged commit 55bbe3d into master Jan 17, 2020
@zombieJ zombieJ deleted the fix-auto-complete-demo branch January 17, 2020 03:39
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.

Error component demo
3 participants