Skip to content

fix: Popconfirm onVisibleChange trigger twice - #42351

Merged
zombieJ merged 1 commit into
4.x-stablefrom
popconfirm-onVisibleChange
May 15, 2023
Merged

zombieJ merged 1 commit into
4.x-stablefrom
popconfirm-onVisibleChange

Conversation

@zombieJ

@zombieJ zombieJ commented May 15, 2023 •

Copy link
Copy Markdown
Member

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Popconfirm trigger onVisibleChange twice.
🇨🇳 Chinese 修复 Popconfirm 的 onVisibleChange 会重复触发的问题。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

🚀 Summary

🤖 Generated by Copilot at 29276c5

This pull request improves the code quality and test coverage of the Popconfirm component. It fixes a lint issue, adds a test for the onVisibleChange prop, and simplifies the props handling logic.

🔍 Walkthrough

🤖 Generated by Copilot at 29276c5

  • Destructure props and assign default values to simplify Popconfirm component code (link)
  • Replace props.onVisibleChange and props.onOpenChange with destructured variables (link)
  • Rename onOpenChange function to onInternalOpenChange to avoid confusion and indicate internal usage (link, link)
  • Remove unused props from Popconfirm component and pass them down to Tooltip component (link)
  • Add parentheses around arrow function parameters to follow code style and lint rules (link, link)

@cr-gpt

cr-gpt Bot commented May 15, 2023

Copy link
Copy Markdown

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@github-actions

Copy link
Copy Markdown
Contributor

Prepare preview

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 281.47 KB (-1 B 🔽)
./dist/antd.min.css 66.3 KB
./dist/antd.dark.min.css 67.54 KB
./dist/antd.compact.min.css 66.25 KB
./dist/antd.variable.min.css 66.84 KB

@codecov

codecov Bot commented May 15, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (94339fb) 100.00% compared to head (29276c5) 100.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##           4.x-stable    #42351   +/-   ##
============================================
  Coverage      100.00%   100.00%           
============================================
  Files             450       450           
  Lines            8343      8343           
  Branches         2539      2539           
============================================
  Hits             8343      8343           
Impacted Files Coverage Δ
components/popconfirm/index.tsx 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zombieJ
zombieJ merged commit 72f213d into 4.x-stable May 15, 2023
@zombieJ
zombieJ deleted the popconfirm-onVisibleChange branch May 15, 2023 03:27
@MadCcc MadCcc mentioned this pull request Jun 27, 2023
20 tasks
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.

3 participants