An open API service indexing awesome lists of open source software.

https://github.com/smnandre/ux-live-nested

Infinite scroll with nested components
https://github.com/smnandre/ux-live-nested

Last synced: 3 months ago
JSON representation

Infinite scroll with nested components

Awesome Lists containing this project

README

          

# Infinite scroll - nested

(tricky) Solution concerning the infinite scroll with nested components.

Original issue: https://github.com/symfony/ux/issues/1816

---


Infinite scroll nested

## Solution

We must create the last fake ID **recursively**.

```twig
{% if page > 1 %}
{# 🐼🐼 Apply the same trick recursively 🐼🐼 #}

{# ALL previous pages #}
{% for _page in 1..(page - 1) %}

{# Fake page #}



{# Fake page LAST resut #}




{% endfor %}
{% endif %}
```

## Run locally

```
composer install
symfony serve
```