Sha256: 3d9c2ad8864bc7b22a6849ec65fc3011e3321d35326d3aac9fb7041b473daeb6

Contents?: true

Size: 236 Bytes

Versions: 11

Compression:

Stored size: 236 Bytes

Contents

// move to some sort of pagination helper in core
export const templatesPage = (templates, pagination) => {
  const offset = (pagination.page - 1) * pagination.perPage;

  return templates.slice(offset, offset + pagination.perPage);
};

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_templates-9.1.0 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-9.0.2 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-9.0.1 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-9.0.0 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-7.0.7 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-8.0.0 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-7.0.6 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-7.0.5 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-7.0.4 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-7.0.3 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js
foreman_templates-7.0.2 webpack/components/TemplateSyncResult/TemplateSyncResultHelpers.js