Module's control panel sub-navigation is not working properly I have a problem with setting up a CP navigation for my module.
In module's init() I declared the following:
Event::on(
    Cp::class,
    Cp::EVENT_REGISTER_CP_NAV_ITEMS,
    function (RegisterCpNavItemsEvent $event) {
        $event-&gt;navItems[] = [
            'url' =&gt; 'asset-checker-module/broken-links',
            'label' =&gt; 'Checker',
            'subnav' =&gt; [
                'broken-links' =&gt; [
                    'url' =&gt; 'asset-checker-module/broken-links',
                    'label' =&gt; 'Fehlerhafte Links'
                ],
                'unused-assets' =&gt; [
                    'url' =&gt; 'asset-checker-module/unused-assets',
                    'label' =&gt; 'Nicht verwendete Dateien'
                ]
            ]
        ];
    }
);

So I see my main navigation item, when I click on it, the subnavigation gets expanded, the first element is active. But when I click on the second item, parent item gets collapsed.
I tried to fix it by setting selectedSubnavItem in my template, it did not help.
Any ideas?

Running Craft 3.2.7.
This is working for me.
Module.php
        Event::on(Cp::class, Cp::EVENT_REGISTER_CP_NAV_ITEMS, function (RegisterCpNavItemsEvent $event) {
            $event-&gt;navItems[] = [
                'url' =&gt; 'modules/video',
                'label' =&gt; 'Video-Converter',
                'icon' =&gt; '@modules/icon-mask.svg',

                'subnav' =&gt; [
                    'inhex' =&gt; [
                        'url' =&gt; 'modules/video/index',
                        'label' =&gt; 'Project-Video',
                    ],
                    'old' =&gt; [
                        'url' =&gt; 'modules/video/old',
                        'label' =&gt; 'Old Projects',
                    ],
                ]
            ];
        });

And in the templates I am using e.g.
{% extends '_layouts/cp' %}

{% set title = 'Old Projects' %}
{% set selectedSubnavItem = 'old' %}