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(Select): optimize controlled highlightKey question, close #3795 #3798

Merged
merged 2 commits into from
Mar 16, 2022

Conversation

weinianyang
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #3798 (37b629a) into master (dd7d557) will decrease coverage by 0.00%.
The diff coverage is 60.00%.

❗ Current head 37b629a differs from pull request most recent head 2795bf3. Consider uploading reports for the commit 2795bf3 to get more accurate results

@@            Coverage Diff             @@
##           master    #3798      +/-   ##
==========================================
- Coverage   90.59%   90.59%   -0.01%     
==========================================
  Files         303      303              
  Lines       17819    17823       +4     
  Branches     5369     5372       +3     
==========================================
+ Hits        16143    16146       +3     
  Misses       1657     1657              
- Partials       19       20       +1     
Impacted Files Coverage Δ
src/select/base.jsx 83.48% <33.33%> (-0.78%) ⬇️
src/select/select.jsx 92.63% <100.00%> (+0.03%) ⬆️
src/table/virtual.jsx 98.49% <0.00%> (+0.75%) ⬆️

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 51f0208...2795bf3. Read the comment docs.

highlightKey: nextProps.value,
});
}

if ('value' in nextProps && nextProps.value !== prevState.value) {
Object.assign(state, {
Copy link
Member

@bindoon bindoon Mar 16, 2022

Choose a reason for hiding this comment

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

挪到这里来,并且限制下 single 单选模式才赋值。(多选模式value是数组)

@bindoon bindoon merged commit 444680a into alibaba-fusion:master Mar 16, 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
Development

Successfully merging this pull request may close these issues.

2 participants