equinor / equinor/webviz-core-components

Improve select popups

Open
#263 1 comment 0 reactions 1 assignee Claimed by @rubenthoms View on GitHub
bug
Dominant language
TypeScript
Stars
17
Forks
17
Avg merge
8h 53m
Merged PRs (30d)
2

Description

When select elements are located at the end of a page / scrollable container, their popups are cut off. Either refactor the select component or find a different solution to this issue.

![image](https://user-images.githubusercontent.com/69145689/191751216-af4d33ec-477c-4bf1-8db7-2a44ae5ce681.png)

The idea is to stick to how the native `select` component works. Here are some screenshots of how it works including an evalutation if the behaviour can be recreated for custom popups using JavaScript.

1. `select` at end of scrollable container with enough space below - popup displays at top level, independent of scroll area:
![image](https://user-images.githubusercontent.com/69145689/191749770-d763900e-1354-40dc-9a00-3cfd53e777a3.png)
- Can be recreated by appending the popup to `body`.

2. `select` at end of browser window - popup displays outside of browser window:
![image](https://user-images.githubusercontent.com/69145689/191749681-199b4620-849a-4a76-8c71-69cc007f8b78.png)
- Impossible to recreate this behaviour
- Possible workaround: display popup above custom select component

3. `select` at end of browser window while the latter is in full screen mode - popup displays above `select` component:
![image](https://user-images.githubusercontent.com/69145689/191750242-ecb68316-81ca-4bdb-a624-d1824475eed9.png)
- Recreatable with same approach as in 2.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.