Skip to content

Mention in documentation that collections cannot be passed with props to PaginatedCollection #45

Description

@klfman

Flowpack.Listable:PaginatedCollection has a collection key that must be set by the user.

The documentation shows an example:

prototype(My.Custom:Object) < prototype(Flowpack.Listable:PaginatedCollection) {
  collection = ${Search.query(site).nodeType('Something.Custom:Here').sortDesc('date')}
  ...
}

When passing the same search query as prop, it does not work:

prototype(My.Custom:Object) < prototype(Neos.Fusion:Component) {
  collection = ${Search.query(site).nodeType('Something.Custom:Here').sortDesc('date')}
  
  renderer = Flowpack.Listable:PaginatedCollection {
    collection=${props.collection}
  }
}

It was hard to find out and took me several hours of debugging to realize that this is simply not possible because of the caching configuration of PaginatedCollection, because the data passed is not saved with the cache entry (see @cache.context).

I'm not sure where exactly, but might it be worth mentioning this in the README or in the code of the fusion component itself?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions