-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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: nativefilter dropdown on scroll #18102
Conversation
@pkdotson Can you post the before video as well? One tip: If you leave a blank line between the After: |
Hey @pkdotson if you can fix the CI we should spin up a testenv. This approach has been proven problematic in the past and I think we need to go deep into testing this out. |
Codecov Report
@@ Coverage Diff @@
## master #18102 +/- ##
==========================================
- Coverage 66.34% 66.34% -0.01%
==========================================
Files 1569 1569
Lines 61687 61688 +1
Branches 6241 6243 +2
==========================================
- Hits 40927 40926 -1
+ Misses 19162 19161 -1
- Partials 1598 1601 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -89,6 +89,12 @@ export interface SelectProps extends PickedSelectProps { | |||
* False by default. | |||
* */ | |||
allowNewOptions?: boolean; | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should be generic. When you say something like to prevent dropdown movement onscroll
you are limiting its uses.
You could use the Ant Design docs for this prop:
Parent Node to which the selector should be rendered.
/testenv up |
@geido Ephemeral environment spinning up at http://54.214.130.185:8080. Credentials are |
One contingent issue that is appearing with these changes is that sometimes the dropdown is not fully visible and you won't be able to scroll the container down either, as you can see in the video. Unicode.Test.1.mp4Before you could still scroll the dashboard container (right side) and the dropdown menu would move with it, basically making it visible. This change is not necessarily worst than the previous behavior just pointing it out for visibility. |
@@ -271,6 +277,7 @@ const Select = ({ | |||
ariaLabel, | |||
fetchOnlyOnSearch, | |||
filterOption = true, | |||
getPopupContainer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put this on top of filterOption
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
This pr fixes an issue when user clicks on nativefilter select and when users scrolls it causes the filter dropdown to move on scroll. This pr moves the dropdown to the parent container using a ref instead of on the page.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
after
Screen.Recording.2022-01-19.at.10.19.27.PM.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION