Skip to content

Setting only the arrowPrevSVG option also impacts arrowNext. #2172

@dave-meyer

Description

@dave-meyer

Description

When setting the arrowPrevSVG option (for example, to an empty string), the arrowNext icon will no longer be shown.

But I think these two options should not impact each other.

Reproduce

Example code to reproduce issue:
https://codesandbox.io/p/sandbox/dzcxv3

Note that when the gallery opens by clicking on an image, neither of the two arrow button icons is visible, even though only the first icon was hidden.

Reason

This issue occurs because the default arrowNext UI element SVG copies the content of the default arrowPrev UI element SVG. Since the default arrowPrev icon is overwritten, but not the default arrowNext icon, the arrowNext icon can no longer be displayed.

Potential fix

I will create a PR that proposes a fix for this issue, where the arrowNext icon uses the same SVG path as the arrowPrev icon, without relying on other SVGs during runtime.

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