Skip to content

Dynamic show change does not work #107

Open
@hubertmiernik

Description

@hubertmiernik

Describe the bug

Hi,
I would like to the show props set a dynamic value and based on that render the elements in the carousel.
Unfortunately, only the first value is always remembered, the next value will not load until we resize the window (?).
Example: https://codepen.io/hubu999/pen/gOBERgY

Reproduction

Example: https://codepen.io/hubu999/pen/gOBERgY

Steps to reproduce:

  1. Open codepen, as you can see the initial value is 4.
  2. Click 'Set show to 3'. Then show value is now 3.
  3. We have still 4 elements in carousel.
  4. Resize window - we have 3 elements. We should see 3 elements without resizing.

System Info

System:
    OS: macOS 13.0
    CPU: (8) arm64 Apple M1 Pro
    Memory: 827.73 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Chrome: 113.0.5672.126
    Safari: 16.1

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions