Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How use this with a dynamic grid instead a list? #356

Open
luiguild opened this issue Mar 19, 2020 · 2 comments
Open

How use this with a dynamic grid instead a list? #356

luiguild opened this issue Mar 19, 2020 · 2 comments

Comments

@luiguild
Copy link

I try include a lot of components forming a grid but I only could create a list... It's possible?

Congrats for this lib :)

@begedin
Copy link

begedin commented Apr 16, 2020

The way we've achieved it in a project is we made the item given to the scroller a "row" component, which renders the correct number of elements.

Effectively, the scroller renders a list of rows vertically that way.

<recycle-scroller
  :items="rows"
>
  <template v-slot="{ item: row }">
    <row-component :items="row.items" />
  </template>
</recycle-scroller>

// row component

<div class="row">
  <item v-for="item in items" :key="item.id" />
</div>

Or you could flip it around and have the scroller render a list of columns horizontally.

@Parakoos
Copy link

I'm doing the same thing with a row component and inner items. The only thing is that those inner components are constantly created and destroyed. If there was a way to operate in 'grid mode' with a fixed height and width, we could reuse all those components which would be sweet

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants