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(explore): fix clearing select data causes popover dismiss #14221

Merged
merged 11 commits into from
May 20, 2021

Conversation

stephenLYZ
Copy link
Member

@stephenLYZ stephenLYZ commented Apr 18, 2021

SUMMARY

This PR fixes the popover dismissed when clearing select data. The cause of this problem is because the clear icon of react-select will disappear after clicking, and the popover component of Antd will capture the mousedown event, this event will determine whether the current target exists under the parent component(here is document.body) , if it does not exist, the popover will be closed, and at this time the clear icon no longer exists.
All select components which set to clearable under popover will have the same problem. So here I passed the actionMeta property, if it is a clear event, the popover will not be closed.
From another perspective, if the clear icon of react select always exists, this problem can be solved.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before

Kapture 2021-04-18 at 20 40 05

After

Kapture 2021-04-18 at 20 41 03

TEST PLAN

ADDITIONAL INFORMATION

@pkdotson
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@pkdotson Ephemeral environment spinning up at http://34.220.174.219:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

LGTM!

@pkdotson pkdotson requested review from villebro and kgabryje May 18, 2021 04:50
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM and tested to solve the problem with no noticeable side-effects

@villebro villebro merged commit ea37274 into apache:master May 20, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
…#14221)

* fix(explore): fix clearing select data causes popover dismiss

* wip: lint

* wip: lint
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
…#14221)

* fix(explore): fix clearing select data causes popover dismiss

* wip: lint

* wip: lint
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…#14221)

* fix(explore): fix clearing select data causes popover dismiss

* wip: lint

* wip: lint
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[explore] Removing data from annotation layerdropdown causes modal dismiss
4 participants