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: Group src order not correct when src updated #62

Merged
merged 1 commit into from
Jan 20, 2021

Conversation

shaodahong
Copy link
Member

@shaodahong shaodahong commented Jan 20, 2021

@vercel
Copy link

vercel bot commented Jan 20, 2021

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/image/n6gxt09c8
✅ Preview: https://image-git-fix-antd-28881.react-component.vercel.app

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #62 (e295ad4) into master (ec046d3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #62   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          229       230    +1     
  Branches        65        63    -2     
=========================================
+ Hits           229       230    +1     
Impacted Files Coverage Δ
src/Image.tsx 100.00% <100.00%> (ø)
src/PreviewGroup.tsx 100.00% <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 ec046d3...e295ad4. Read the comment docs.

@shaodahong shaodahong requested review from afc163 and zombieJ January 20, 2021 07:27
@shaodahong shaodahong merged commit d914ef9 into master Jan 20, 2021
@shaodahong shaodahong deleted the fix-antd-28881 branch January 20, 2021 07:45
setPreviewUrls(oldPreviewUrls => {
const clonePreviewUrls = new Map(oldPreviewUrls);
const deleteResult = clonePreviewUrls.delete(id);
return deleteResult ? clonePreviewUrls : oldPreviewUrls;
});
};

// we don't to test this if canPreview changed when same url

Choose a reason for hiding this comment

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

Suggested change
// we don't to test this if canPreview changed when same url
// we don't need to test this if canPreview changed when url stays the same

Maybe this is better👀

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks.

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.

在表格内使用Image.PreviewGroup加载多张图片切换时不同Group&record之间图片互串
3 participants