Giter Site home page Giter Site logo

Comments (8)

pzuraq avatar pzuraq commented on May 18, 2024

Hmm, that's a tricky one. Users can technically put any number of things before or after the vertical-collection component, like headers, footers, or other things. Theoretically it's supposed to be a drop-in replacement for each, so you should be able to use it like an each and expect it to flow with the rest of the document correctly(-ish). So I'm not sure what the more intuitive behavior would be here.

One possible solution would be to set the initial scrollPosition value to some absurdly large number, but I don't know if that's any better.

from vertical-collection.

pzuraq avatar pzuraq commented on May 18, 2024

Quick update, scrollPosition is definitely not recommended, we're removing it for beta.2.

@runspired any thoughts here? If idForFirstItem is not provided it does kind of make sense to have renderFromLast render from the bottom of the scrollContainer rather than the last element. I could see it going either way.

from vertical-collection.

runspired avatar runspired commented on May 18, 2024

I need more context on this issue, as I understand it, is the layout this?

<scroll-container>
   <some-header />
   <vertical-collection />
   <some-footer />
</scroll-container>

from vertical-collection.

evoactivity avatar evoactivity commented on May 18, 2024

@runspired

my instance is more like so

<some-header />
<scroll-container>
   <vertical-collection />
</scroll-container>
<some-footer />

Then to keep my collection items from being flush I added padding to the scroll container. So let's say my padding was 20px all around, the renderFromLast would goto the right item but be 40px too short.

from vertical-collection.

runspired avatar runspired commented on May 18, 2024

@evoactivity can you use margin instead for this? The trouble with padding is it's relatively hard to distinguish between height and padding, but it's not too hard to distinguish between margin and (height + padding).

from vertical-collection.

runspired avatar runspired commented on May 18, 2024

@evoactivity this should be fixed for static heights on master, and for dynamic heights when #84 lands.

from vertical-collection.

runspired avatar runspired commented on May 18, 2024

@evoactivity this should be fixed now, closing unless you encounter additional issue :)

from vertical-collection.

evoactivity avatar evoactivity commented on May 18, 2024

Nice one @runspired, I'll let you know if I run into anything?

from vertical-collection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.