Skip to content

When navigating using forward/back 'parseAsNativeArrayOf' does not trigger state-change #1162

@Alexolo

Description

@Alexolo

Context

What's your version of nuqs?

2.7.0

What framework are you using?

  • ✅ React Router

Which version of your framework are you using?

        "react-router-dom": "6.11.2"

Description

Just updated to 2.7.0 to make use of the 'parseAsNativeArrayOf' parser since it better aligns with my backend.

My toggle-button-group allows for multiple selections, and when using the buttons to click, the url updates correctly, same with deselecting.

My issue is when i use the 'history: "push"' option to be able to use the back button for previous states, changes are not emitted. I have checked and if i use 'parseAsArrayOf' the state updates correctly using forward/back navigation.

Reproduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions