@24i/bigscreen-sdk 1.0.43-alpha.2725 → 1.0.43-alpha.2726

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24i/bigscreen-sdk",
3
- "version": "1.0.43-alpha.2725",
3
+ "version": "1.0.43-alpha.2726",
4
4
  "description": "SmartApps BIGscreen SDK monorepo",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -298,15 +298,15 @@ export class UnifiedGridController<T> implements IUnifiedGridController<T> {
298
298
  const { grid } = this;
299
299
  const base = grid.base.current!;
300
300
  const targetScrollIndex = this.itemIndexToScrollIndex(dataIndex);
301
- if (targetScrollIndex > this.scrollIndex) {
302
- this.adjustGroupsOffsetsForward(targetScrollIndex);
303
- } else if (targetScrollIndex < this.scrollIndex) {
304
- this.adjustGroupsOffsetsBackward(targetScrollIndex);
305
- }
306
301
  if (targetScrollIndex !== this.scrollIndex) {
307
- this.scroll(targetScrollIndex, animate);
302
+ const backwards = targetScrollIndex < this.scrollIndex;
303
+ const lastScrollIndex = this.scrollIndex;
304
+ const scrollToIndex = Math.abs(targetScrollIndex - this.scrollIndex);
305
+ for (let i = 1; i <= scrollToIndex; i++) {
306
+ this.scroll(backwards ? lastScrollIndex - i : lastScrollIndex + i, animate);
307
+ }
308
+ base.index = dataIndex;
308
309
  }
309
- base.index = dataIndex;
310
310
  this.focusCurrentItem();
311
311
  base.mrcuRef.current?.handleArrowState();
312
312
  }