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(dropdown): fix close popup doesn't emit 'visibleChange' event #6416

Closed

Conversation

CCherry07
Copy link
Member

@CCherry07 CCherry07 commented Apr 3, 2023

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

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

What's the background?

  1. Describe the source of requirement.
  2. Resolve what problem.
  3. Related issue link.
    fix(dropdown): fix close popup doesn't emit 'visibleChange' event  #6324
    fix dropdown visible change fired when user click on filters from table header cell #6405
    Dropdown visible change fired when user click on filters from table header cell (from version 3.2.16) #6400

API Realization (Optional if not new feature)

  1. Basic thought of solution and other optional proposal.
  2. List final API realization and usage sample.
  3. GIF or snapshot should be provided if includes UI/interactive modification.

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
  2. What will say in changelog?
  3. Does this PR contains potential break change or other risk?

Changelog description (Optional if not new feature)

  1. English description
  2. Chinese description (optional)

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

Additional Plan? (Optional if not new feature)

If this PR related with other PR or following info. You can type here.

@@ -51,11 +51,12 @@ export default defineComponent({
});

const onClick = (e: MouseEvent) => {
if (triggerVisible.value !== props.visible) {
Copy link
Member

Choose a reason for hiding this comment

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

这个还是 revert 吧,这样也不靠谱

Copy link
Member Author

@CCherry07 CCherry07 Apr 4, 2023

Choose a reason for hiding this comment

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

原来那个,会有bug,我感觉可能是trigger 组件的问题,这个问题的引起可能是那个 sPopupVisible 这个状态,被两个地方进行修改,一个是监听了props.popupVisible ,另外一个是 setPopupVisible

Copy link
Member

Choose a reason for hiding this comment

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

嗯嗯,先回滚掉,原来只是不触发 visibleChange,影响较小,可以再看看根本问题
话说 antd react 应该也有问题吧

Copy link
Member

Choose a reason for hiding this comment

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

文档明确说了click不触发onVisibleChange,虽然这行为也挺让人难理解的

@CCherry07 CCherry07 closed this Apr 6, 2023
@CCherry07 CCherry07 deleted the fix(table)event-outside branch April 23, 2023 16:53
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants