Skip to content

withOnShow not updating on navigation #143

@majkiee

Description

@majkiee

I'm using withOnShow to bind a viewmodel based on a wildcard id.

The showView will use pager.getActivePage().currentId to get the current id and request the corresponding viewmodel data.

It works fine on the first page load (/view/1) but if I click on a link to /view/2 the viewModel is not updated, the first one is still used. But if i point my browser to /view/2 directly the correct viewModel loads.

Have I missed anything or can I force pagerjs to refresh to the new viewModel?

I have logged the viewModel returned by the showView function and it will return the correct vm on link navigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions