repeater-app icon indicating copy to clipboard operation
repeater-app copied to clipboard

Add options for pagination, multiline values, custom key name

Open filloax opened this issue 9 months ago • 1 comments
trafficstars

This PR adds various options

  • pagination (defaults to False)
  • optional default items per page (defaults to 100)
  • multiline value fields (defaults to False)
  • optional custom key name

Additionally, to make use of the Contentful Forma 36 v4 Pagination component, the package has been updated to use Forma 36 v4 and React 18 (to fix a build issue with React 17, which is the version the Forma 36 updater would use by default after the upgrade).

immagine

This requires the following new instance parameters to be set:

  • keyName: string, optional
  • multiLineValues: boolean, default to false
  • usePagination: boolean, default to false
  • defaultPageItems: number, optional

If all the new settings are left at the default values, the Repeater application will look the same as without this PR, other than the color changes in buttons due to the v4 upgrade.

Context for the change: my usecase required large lists of key-value items, which were large enough to freeze the Contentful web-application. Similarly, multi-line editor were useful in my usecase.

filloax avatar Feb 03 '25 14:02 filloax

immagine Example with all the options activated (with items per page set to 3 for testing)

filloax avatar Feb 03 '25 14:02 filloax