Skip to content

itemsToScroll is broken when wrapAround is set to true #522

@emlimlf

Description

@emlimlf

Describe the bug
Setting the wrapAround to true adds an "extra" page or scroll. I've set the itemsToShow: 3 and itemsToScroll: 3. When you click on the next page, it'll only scroll 2 items not 3. This does not happen if the wrapAround set to true.

To Reproduce
Here: https://v43.livecodes.io/?x=code/N4IgLglmA2CmIC4QDUCusDMBaAxgQwCcB7VAZ1mhABoQATWUnAiAB0iIDtERqQALWHlrcAPAFtYYPAAIcfQuTABeADogAqgBUAYlgAca6QHoAfCo7jJMjngmqQANwiwA7iyIEwhnJzCwOymouELRgfEr0TjiwWMGhfFTSEBxQEHjQWIzpsEoAjAB0AAyGprx8YGLQAIJgYASk3NB4HADm9v7eTaSk9mq8Ui0NCADaALo0eDiQDrAAorRQHtyMzGy8YoQA1qgsiKBNrah4LfBI5ZW8PgH+YNwgAL40pGAAnnB7IActRyfcON2XXw3O6PEArVi3BD7ZrfY6nRzoQHXAKicFsaSKHZmFJidyeaQAcgc6Gw+GIZAoRjJJHI0Hy-1IBPMEFxHjA0mA0gAwoQaRREgBlaAhWCJAByeCcLTw7A40nu0gAZsQxITiZhcLyKdAmRxzFdnkkNidSNIlNIqgQCHgXvllUQxAAKTlwVphBDSACc8sSjoA+olkvQAB4ASjNJmkzvM0iStA9QdgwekAGppLkqDHpKgCNAPQADcpgFikBBGIwsCD-VBifIsPhEMBEUhGciwWhGAAkwAAsjK+PlrRxaA7HaH7kY9IVCkYAGzT-OZjj3UOh8z6ziGq6KiAtM0crMCXflD0AJmnS9jUFgYlImiIAobLg9GEvST8t-vAqYRGgeekr5ZqQwr0FUwotBwHoEs8hBgASb7SiwL6nm+LjWiwlokMOHqKuk5BLvc5giK2TAQtiREfiwTR+NisYiDy5K0tIDhYAARkG9jbruai0bG0giEKIrMVgioePYjosnCgbDkm4bJEacKkIYCCbLALz2JJJz5CEPFZnx-EsnuCCkAQOAacasD5Dm0CGOkgQgJpsAlLx+kiAsDgYq8cCcb+HgegAxIqQW6XK+kcsAibBvchGha5RjuS5-FGIJ9DkbF-GUdRsDSP5QgjhwpCJXREpSjKECcMYiXEZlMqwLxxEMXy0DYtVN5UbVaUiM8bx1eYCDEI2B6haxkybC05LDrgvkEAFp4ACzzfNADc5gxeY9JakxwBZlgWAODgWA2CxI04GNE3xtIBAtCNjqngArHdiT3Y90jPYkhT5AA7KGK2hbt+2HZKbEePQBBYNaCxkB6uTTgApL9a04nu23DSDsBgxDEBQ9IegsMGv2xnE7rpnDBPSEeLQniThTw1mRCsQAVrAUwiVAHo+DMBAI0RrZeb1XCgt1cCkAIkhDGMTykWw4vjCADIAAoEAwkh3DQLDENE3QeDLNA4GQTZiAKkiQK0QzAKCLJ4mAZsIvCRYlmWVK0Bw+QM6Q9DCg4BD5BwkhGBwLBiEY6rxRAzzB+gg6oAELKWQwYhscQLjkN76tELQrsNDQ6qkptFDcPbpbljgzuZx7EBez7fsB0HOeaoxlILOH1LavkYhu7wdct7SVJ53SDIF7UDvF6Xbvl5XvtgP7gcRxq3eN2HU-z-3AKgq8LAMHsa8MNbHxfD88LrwwUu3LrQIokgDzZ+jpDlVwSBzRg-REL+Nv+HgrFwMISDpJQExTBXeEBpfzwCeFIMAZA-jQGbO2B49wgA

Expected behavior
It should scroll to the set itemsToScroll value

Desktop (please complete the following information):

  • OS: MacOS
  • Browser chrome
  • Version 137.0.7151.69 (Official Build) (arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions