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

dropdown fails inside scrollable table #57

Open
kikonen opened this issue Jan 23, 2020 · 5 comments
Open

dropdown fails inside scrollable table #57

kikonen opened this issue Jan 23, 2020 · 5 comments
Labels
bug Something isn't working medium

Comments

@kikonen
Copy link
Owner

kikonen commented Jan 23, 2020

When dropdown is opened inside table, it may be cut-off by scrollable table boundaries.

Likely only way to fix this would be to make popup "absolute" and float it over whole page. That however affects scrolling behaviour, since browser won't automatically keep popup in sync with widget location.

Thus should make this "absolute" mode optional, to be applied only in the case when it's actually needed.

@kikonen
Copy link
Owner Author

kikonen commented Jan 23, 2020

Problem is actually even more tricky, since order to do this, popup must be opened in the context of approriate root (ex. document.body) otherwise it will be cut-off by scrollable viewport.

Not sure, svelte even supports doing such now.

@kikonen kikonen changed the title dropdown fails inside table dropdown fails inside scrolalble table Jan 23, 2020
@kikonen
Copy link
Owner Author

kikonen commented Jan 23, 2020

Sounds related: sveltejs/svelte#1133

@kikonen kikonen changed the title dropdown fails inside scrolalble table dropdown fails inside scrollable table Jan 23, 2020
@kikonen kikonen added bug Something isn't working high labels Jan 23, 2020
@kikonen
Copy link
Owner Author

kikonen commented Jan 30, 2020

Plan

  • Give separate "config.container" parameter to widget creation
  • separate "select control" and "dropdown" into separate components
  • insert "dropdown" component into "config.container" element, to be contain popup
  • use some svelte store or (passing variables to "owned" components?!?) to pass "display list" to popup component.

@kikonen
Copy link
Owner Author

kikonen commented May 16, 2020

Actual plan

  • "position:fixed" and event listening

Trying out this approach

@kikonen
Copy link
Owner Author

kikonen commented May 16, 2020

done

  • "position: fixed" works reasonably (With minimal test setup)

todo

  • only window scrolling handled, not scrolling of scrollpane where table is contained.

@kikonen kikonen added medium and removed high labels Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium
Projects
None yet
Development

No branches or pull requests

1 participant