Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

dropdown display incorrect positioning #96

Closed
cldougl opened this issue Sep 14, 2018 · 5 comments
Closed

dropdown display incorrect positioning #96

cldougl opened this issue Sep 14, 2018 · 5 comments
Assignees

Comments

@cldougl
Copy link
Member

cldougl commented Sep 14, 2018

the dropdown menu appears below where it should be:
screen shot 2018-09-14 at 3 17 04 pm

(note: not seeing the same behaviour in the local example)

cc @Marc-Andre-Rivet @wbrgss

@cldougl cldougl added the p1 label Sep 14, 2018
@cldougl
Copy link
Member Author

cldougl commented Sep 14, 2018

@cldougl
Copy link
Member Author

cldougl commented Sep 14, 2018

additionally, this seems to specifically appear when setting n_fixed_columns

@wbrgss
Copy link
Contributor

wbrgss commented Sep 14, 2018

I think it might be possible to avoid calculating top and left offsets with JS, and let the browser calculate positioning with CSS. This should make this behaviour more consistent.

@Marc-Andre-Rivet Would anything prevent something this from working?

.Select.is-clearable.is-focused.is-open.Select--single {
    position: relative;
    overflow: visible;
}

Then on the child .Select-menu-outer, we can remove the top and left properties. And keep position: absolute. This is just some quick testing with dev tools so there may be a good reason I don't know about for explicitly calculating the absolute positioning.

@wbrgss
Copy link
Contributor

wbrgss commented Sep 14, 2018

IIRC we actually discussed this last month over a slack call. The problem with my solution above would be that dropdowns get cut off on lower rows unless the user scrolls down.

@Marc-Andre-Rivet
Copy link
Contributor

@wbrgss @cldougl I think having a relative parent will bring back the clipping issue due to the spreadsheet div having overflow: hidden

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants