Skip to content

Conversation

MadCcc
Copy link
Member

@MadCcc MadCcc commented Feb 21, 2022

@vercel
Copy link

vercel bot commented Feb 21, 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/DKuyaLCNSDBtZqVqwRTRAa2yi7ct
✅ Preview: https://select-git-fix-select-zero-option-react-component.vercel.app

@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #718 (7a4cbf2) into master (efcacc0) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #718   +/-   ##
=======================================
  Coverage   99.50%   99.50%           
=======================================
  Files          25       25           
  Lines        1009     1009           
  Branches      320      320           
=======================================
  Hits         1004     1004           
  Misses          4        4           
  Partials        1        1           
Impacted Files Coverage Δ
src/OptionList.tsx 99.28% <100.00%> (ø)

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 efcacc0...7a4cbf2. Read the comment docs.

@MadCcc MadCcc merged commit e8cdfab into master Feb 22, 2022
@MadCcc MadCcc deleted the fix/select-zero-option branch February 22, 2022 02:18

const content = mergedLabel || value;
// https://github.com/ant-design/ant-design/issues/34145
const content = typeof mergedLabel === 'number' ? mergedLabel : mergedLabel || value;
Copy link
Member

Choose a reason for hiding this comment

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

NaN呢? 感觉判断undefined吧?

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.

Select组件下拉选项的text值为0时,实际展示的文本是value值

2 participants