Skip to content

Navigation state doesn't update #76

Description

@nickstewart95

For my Nova menu, I have a section called Reports with two dashboards inside of it

MenuSection::make('Reports', [
    MenuItem::dashboard(Demographics::class),
    MenuItem::dashboard(Statistics::class),
])->icon('document-report'),

Anytime I click from one of those dashboards links to any other item in the menu, the menu state doesn't change. This is limited to just these two dashboards... If I remove the NovaDashboard card from each dashboard, the issue resolves itself, so I figured it something to do with NovaDashboard,

Ex dashboard

class Demographics extends Dashboard
{
    public function name()
    {
        return 'Demographics';
    }

    public function cards()
    {
        return [
            NovaDashboard::make()
                ->addView('Demographics Filters', function (View $view) {
                    $view->static();

                    return $view
                        ->icon('window')
                        ->addWidgets([
                            GenderWidget::make()->layout(4, 2, 9, 0),
                        ])
                        ->addFilters([
                            Gender::make(),
                            Status::make(),
                            Year::make(),
                        ]);
                }),
        ];
    }

    public function uriKey()
    {
        return 'demographics';
    }
}

Demo

Screen.Recording.2024-02-05.at.2.45.25.PM.mov

It doesn't show in the demo, but the new page loads with no issues after each click

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