From b0c0d12f98b3b492e3a6f1ec90efa9f56576d65e Mon Sep 17 00:00:00 2001 From: Brian Philip <108753128+brian2197@users.noreply.github.com> Date: Fri, 8 Sep 2023 22:16:14 +0400 Subject: [PATCH] feat: pc-1159 Add slot for cross lane promo (#184) --- src/components/AcvInfiniteScroller.vue | 17 +++++++++-------- .../AcvInfiniteScroller.spec.js.snap | 4 +++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/AcvInfiniteScroller.vue b/src/components/AcvInfiniteScroller.vue index fa4788f..9cb23b7 100644 --- a/src/components/AcvInfiniteScroller.vue +++ b/src/components/AcvInfiniteScroller.vue @@ -28,6 +28,10 @@ + @@ -191,8 +195,7 @@ export default { return `infinite-scroller-list-${this.inputId}`; }, wrapHeight() { - const totalHeight = this.itemCount * this.rowHeight; - return totalHeight; + return this.itemCount * this.rowHeight; }, infiniteScrollerWrapStyle() { return { @@ -253,8 +256,7 @@ export default { * The translateY amount to be applied to the list */ offsetY() { - const offset = this.startIndex * this.rowHeight; - return offset; + return this.startIndex * this.rowHeight; }, /* * Apply the offsetY to the list containing the data sources @@ -381,10 +383,9 @@ export default { .sort((a, b) => a - b); const resolution = resolutions.filter((r) => (r <= this.windowWidth)).pop(); if (resolution) { - const itemsPerRow = this.viewportChunksDefinitions[`${resolution}`] - || this.viewportChunksDefinitions[`${resolution}px`] - || 1; - return itemsPerRow; + return this.viewportChunksDefinitions[`${resolution}`] + || this.viewportChunksDefinitions[`${resolution}px`] + || 1; } return 1; }, diff --git a/src/components/__tests__/__snapshots__/AcvInfiniteScroller.spec.js.snap b/src/components/__tests__/__snapshots__/AcvInfiniteScroller.spec.js.snap index d4cd692..ce67320 100644 --- a/src/components/__tests__/__snapshots__/AcvInfiniteScroller.spec.js.snap +++ b/src/components/__tests__/__snapshots__/AcvInfiniteScroller.spec.js.snap @@ -15,7 +15,9 @@ exports[`AcvInfiniteScroller.vue Should render infinite scroll should render inf >
+ > + +