Repository navigation
fix: Popover closes on change of dropdowns values - #12410
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12410 +/- ##
==========================================
+ Coverage 62.45% 66.79% +4.34%
==========================================
Files 1015 1015
Lines 49537 49554 +17
Branches 5079 5083 +4
==========================================
+ Hits 30937 33101 +2164
+ Misses 18391 16323 -2068
+ Partials 209 130 -79
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…opover_closes_onchange
|
I found issue related to scrolling with dropdown active: |
|
For reference, this is the react-select issue related to scrolling JedWatson/react-select#4088 |
|
Looks like a very tricky bug. I can live with the sticky menu if it doesn't happen very often. Can we add an option to |
kkucharc
left a comment
There was a problem hiding this comment.
Thank you for the contribution! Seems that moving menuPortalTarget higher structure may help.
I also saw scroll problem that @adam-stasiak mentioned. Unfortunately it happens in many places such as explore:

…opover_closes_onchange
…opover_closes_onchange
|
I have cleaned up the things a bit. The When the option I have also updated the PR description to better detail the problem and the chosen solution. Sales.Dashboard.mp4 |
…geido/incubator-superset into fix/issue_12388_popover_closes_onchange
…opover_closes_onchange
|
Removing data from dropdown causes modal dismiss. Nagranie.z.ekranu.2021-01-12.o.22.51.08.movMoved this issue to: #12475 |
|
@adam-stasiak seems related to a different issue to me |
kkucharc
left a comment
There was a problem hiding this comment.
Thanks a lot for improvement!
According to the video in your comment: I understand that keeping dropdown open and sticked to the input until we click somewhere else is just impossible to achieve?
@kkucharc impossible is not as I would define it. The problem is that this is a known issue of the react-select library and it does not have an optimal solution right now. Fixing this on our side might mean coming up with hacks that are not desirable. Closing the dropdown on scroll is already some sort of hack, but I would not go beyond that really. |
|
@geido The video in this issue includes problem that your PR could solve. I added |
|
@kkucharc that's an issue affecting all the modals. I think I have a solution for that and I am going to submit a separate PR. In fact, we don't need to necessarily use the EDIT: #12502 |
|
Tested manually across other places in app - looks fine. |
|
we are canceling rc2, kicking off rc3 to include this and a couple of others @ktmud |
* release: bump to 1.0.0 and CHANGELOG * fix(explore): long metric name display (#12387) * fix(explore): long metric name display * add tooltip to control * chore: Show datasets when search input is empty (#12391) * chore: Fix typo “Rest” to “Reset” (#12392) * chore: upgrade eslint, babel, and prettier (#12393) * feat(explore): add tooltip to timepicker label (#12401) * chore: change Datasource to Dataset in Explore ui (#12402) * chore(explore):change dataset to datasource in ui * modal * Add space * Changing it back🤦🏾♀️ * Chargeback * fix: Refresh Interval Modal dropdown (#12406) * fix(native-filters): incorrect queriesData state (#12409) * refactor: from superset.utils.core break down date_parser (#12408) * Fixes control panel fields styling (#12236) (#12326) * feat: Resizable dataset and controls panels on Explore view (#12411) * Implement resizable panels on explore view * Optimize chart rendering while resizing * Make dataset column narrower Co-authored-by: Evan Rusackas <[email protected]> * fix(dashboard): artefacts shown while drag and dropping deck.gl charts (#12418) * [12181] Fix artifacts while drag and dropping deck.gl charts. * Run prettier * bump superset-ui packages for rolling window change (#12426) * chore: bump superset-ui deckgl plugin (#12466) * fix: do not show vertical scrollbar for charts in dashboard (#12478) * fix: do not show vertical scrollbar for charts in dashboard * Proper fix for #11419 Co-authored-by: Jesse Yang <[email protected]> * fix(dashboard): use datasource id from slice metadata (#12483) * fix(timepicker): make pyparsing thread safe (#12489) * fix: make pyparsing thread safe * remove parenthesis for decorator * fix (SQL Lab): disappearing results on tab switch (#12472) * fix (SQL Lab): disappearing results on tab switch * Remove state * Fix test * fix: import ZIP files that have been modified (#12425) * fix: import ZIP files that have been modified * Add unit test * update changelog with rc2 entries * fix: impose dataset ownership check on old API (#12491) * fix: impose dataset ownership check on old API * update UPDATING.md * partially protect the old MVC also * prevent metric and column add and update * ci: remove refs/tags from docker tags on a release (#12518) * ci: remove refs/tags from docker tags on a release * wider head * fix: lowercase all columns in examples (#12530) * fix(explore): time table control panel (#12532) * fix(explore): Add Time section back to FilterBox (#12537) * Fixing Pinot queries for time granularities: WEEKS/MONTHS/QUARTERS/YEARS (#12536) * fix: Select options overflowing Save chart modal on Explore view (#12522) * Fix select options overflowing modal * fix unit test Co-authored-by: Ville Brofeldt <[email protected]> * Fix list filters vertical alignment (#12497) * feat(db-engine): Add support for Apache Solr (#12403) * [db engine] Add support for Apache Solr * Fixing typo * chore: rename docker image in build_docker_image.sh, docker-compose.yml and helm values.yaml (#12337) * add rc3 changelog entries * fix: Popover closes on change of dropdowns values (#12410) * fix: Add MAX_SQL_ROW value to LIMIT_DROPDOWN (#12555) * fix(viz): missing groupby and broken adhoc metrics for boxplot (#12556) * fix: height on grid results (#12558) * fix: case expression should not have double quotes (#12562) * Fix 500 error when loading dashboards with slice having deleted dataset (#12535) * add rc4 changelog entries * Fixed typo on line 348 * Added files Co-authored-by: Daniel Gaspar <[email protected]> Co-authored-by: Yongjie Zhao <[email protected]> Co-authored-by: Geido <[email protected]> Co-authored-by: Junlin Chen <[email protected]> Co-authored-by: Jesse Yang <[email protected]> Co-authored-by: Agata Stawarz <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Michael S. Molina <[email protected]> Co-authored-by: Kamil Gabryjelski <[email protected]> Co-authored-by: Evan Rusackas <[email protected]> Co-authored-by: Kasia Kucharczyk <[email protected]> Co-authored-by: Phillip Kelley-Dotson <[email protected]> Co-authored-by: Grace Guo <[email protected]> Co-authored-by: Beto Dealmeida <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Xiang Fu <[email protected]> Co-authored-by: Ahmed Adel <[email protected]> Co-authored-by: Amit Miran <[email protected]> Co-authored-by: Hugh A. Miles II <[email protected]> Co-authored-by: Shuyao Bi <[email protected]> Co-authored-by: Lyndsi Kay Williams <[email protected]>
* release: bump to 1.0.0 and CHANGELOG * fix(explore): long metric name display (apache#12387) * fix(explore): long metric name display * add tooltip to control * chore: Show datasets when search input is empty (apache#12391) * chore: Fix typo “Rest” to “Reset” (apache#12392) * chore: upgrade eslint, babel, and prettier (apache#12393) * feat(explore): add tooltip to timepicker label (apache#12401) * chore: change Datasource to Dataset in Explore ui (apache#12402) * chore(explore):change dataset to datasource in ui * modal * Add space * Changing it back🤦🏾♀️ * Chargeback * fix: Refresh Interval Modal dropdown (apache#12406) * fix(native-filters): incorrect queriesData state (apache#12409) * refactor: from superset.utils.core break down date_parser (apache#12408) * Fixes control panel fields styling (apache#12236) (apache#12326) * feat: Resizable dataset and controls panels on Explore view (apache#12411) * Implement resizable panels on explore view * Optimize chart rendering while resizing * Make dataset column narrower Co-authored-by: Evan Rusackas <[email protected]> * fix(dashboard): artefacts shown while drag and dropping deck.gl charts (apache#12418) * [12181] Fix artifacts while drag and dropping deck.gl charts. * Run prettier * bump superset-ui packages for rolling window change (apache#12426) * chore: bump superset-ui deckgl plugin (apache#12466) * fix: do not show vertical scrollbar for charts in dashboard (apache#12478) * fix: do not show vertical scrollbar for charts in dashboard * Proper fix for apache#11419 Co-authored-by: Jesse Yang <[email protected]> * fix(dashboard): use datasource id from slice metadata (apache#12483) * fix(timepicker): make pyparsing thread safe (apache#12489) * fix: make pyparsing thread safe * remove parenthesis for decorator * fix (SQL Lab): disappearing results on tab switch (apache#12472) * fix (SQL Lab): disappearing results on tab switch * Remove state * Fix test * fix: import ZIP files that have been modified (apache#12425) * fix: import ZIP files that have been modified * Add unit test * update changelog with rc2 entries * fix: impose dataset ownership check on old API (apache#12491) * fix: impose dataset ownership check on old API * update UPDATING.md * partially protect the old MVC also * prevent metric and column add and update * ci: remove refs/tags from docker tags on a release (apache#12518) * ci: remove refs/tags from docker tags on a release * wider head * fix: lowercase all columns in examples (apache#12530) * fix(explore): time table control panel (apache#12532) * fix(explore): Add Time section back to FilterBox (apache#12537) * Fixing Pinot queries for time granularities: WEEKS/MONTHS/QUARTERS/YEARS (apache#12536) * fix: Select options overflowing Save chart modal on Explore view (apache#12522) * Fix select options overflowing modal * fix unit test Co-authored-by: Ville Brofeldt <[email protected]> * Fix list filters vertical alignment (apache#12497) * feat(db-engine): Add support for Apache Solr (apache#12403) * [db engine] Add support for Apache Solr * Fixing typo * chore: rename docker image in build_docker_image.sh, docker-compose.yml and helm values.yaml (apache#12337) * add rc3 changelog entries * fix: Popover closes on change of dropdowns values (apache#12410) * fix: Add MAX_SQL_ROW value to LIMIT_DROPDOWN (apache#12555) * fix(viz): missing groupby and broken adhoc metrics for boxplot (apache#12556) * fix: height on grid results (apache#12558) * fix: case expression should not have double quotes (apache#12562) * Fix 500 error when loading dashboards with slice having deleted dataset (apache#12535) * add rc4 changelog entries * Fixed typo on line 348 * Added files Co-authored-by: Daniel Gaspar <[email protected]> Co-authored-by: Yongjie Zhao <[email protected]> Co-authored-by: Geido <[email protected]> Co-authored-by: Junlin Chen <[email protected]> Co-authored-by: Jesse Yang <[email protected]> Co-authored-by: Agata Stawarz <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Michael S. Molina <[email protected]> Co-authored-by: Kamil Gabryjelski <[email protected]> Co-authored-by: Evan Rusackas <[email protected]> Co-authored-by: Kasia Kucharczyk <[email protected]> Co-authored-by: Phillip Kelley-Dotson <[email protected]> Co-authored-by: Grace Guo <[email protected]> Co-authored-by: Beto Dealmeida <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Xiang Fu <[email protected]> Co-authored-by: Ahmed Adel <[email protected]> Co-authored-by: Amit Miran <[email protected]> Co-authored-by: Hugh A. Miles II <[email protected]> Co-authored-by: Shuyao Bi <[email protected]> Co-authored-by: Lyndsi Kay Williams <[email protected]>

SUMMARY
The option
menuPortalTargetof the react-select component was introduced in order for the dropdowns to show fully when overlaying certain container elements. However, setting themenuPortalTargettodocument.body(as originally the multi-choice dropdown did and later the single-choice) comes with several issues, such as the click events being targeted outside of the container elements, that ultimately caused this issue #12388.This PR removes the
menuPortalTargetfor both single-choice and multi-choice dropdowns. In addition to that, this introduces the optional ability to force the overflow visibility of the dropdowns for cases where setting theoverflowvisibleisn't viable on the container element (see for instance issue #12004 )It also adjusts some excessive z-index by setting it high enough to give it precedence over the Antd Popover and other components.
Closes #12388
BEFORE
BEFORE-Num.Births.Trend.mp4
AFTER
AFTER-Num.Births.Trend.mp4
TEST PLAN
ADDITIONAL INFORMATION