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

Preserving overflowing containers' scroll positions #26

Open
adicco opened this issue Dec 25, 2023 · 0 comments
Open

Preserving overflowing containers' scroll positions #26

adicco opened this issue Dec 25, 2023 · 0 comments

Comments

@adicco
Copy link

adicco commented Dec 25, 2023

I have a standard listing of audio recordings with different filters on the left which are grouped in overflowing containers; say something like this:

<div id="core">
  <aside>
    <form id="author"  hx-post="...." hx-swap="morph:outerHTML" hx-target="#core" style="overflow: auto; max-height: 100px">
     <input type="checkbox" value="..." id="input-author1" /> author 1
     <input type="checkbox" value="..." id="input-author2" /> author 2
  etc...
    </div>
    
    <form id="years" hx-post="....">
    </form>
  
  </aside>

  <main>/* contents */</main>
</div>

Each time a checkbox is changed my backend performs a search and returns the whole #core container. This is because the filters are reactive, and indeed if you filter by a particular author, this might disable certain yeras, and vice versa (and it gets more complex with more filter categories, of course.)

I was expecting idiomorph to preserve the form's scroll position, but it doesn't. Any idea?

Thank you very much!

@adicco adicco changed the title Preserving container scroll position Preserving overflowing containers' scroll positions Dec 25, 2023
KDreynolds pushed a commit to KDreynolds/idiomorph that referenced this issue Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant