Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Nested modals with navigate don't change URL #149

@harisenbon

Description

@harisenbon

Environment Details

  • PHP Version: 8.2
  • Laravel Version: 10
  • React or Vue Version: 3.4
  • Inertia.js Version: 1.3
  • Inertia Modal Version: dev-master

Feature Request

What feature would you like to see?

Currently when opening a navigate nested modal from within a modal (either GET or POST), the URL will change only for the initial modal, not the child modals.

I believe that this is caused by this line:

// ModalStack.js 274
let useInertiaRouter = useBrowserHistory && stack.value.length === 0

Why is it needed?

In multi-nested slideovers (similar to Stripe or Google Tag Manager), it is useful to be able to refer to the top level modal in the case where users want to link directly to that page.

Alternatives Considered

I've tried updating the URL using the History API manually on those pages, but then the back / forward buttons don't work as it doesn't go through the inertia router, which messes up navigation.


This is a pretty big ask from our userbase. If it's something that would benefit the package as a whole, would love to work on a solution.

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