Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3-pro] c-show and c-active not set for extended path #146

Closed
wittfabian opened this issue Aug 19, 2020 · 7 comments
Closed

[v3-pro] c-show and c-active not set for extended path #146

wittfabian opened this issue Aug 19, 2020 · 7 comments
Assignees

Comments

@wittfabian
Copy link

wittfabian commented Aug 19, 2020

c-show and c-active are not automatically set if the path does not match 100%

c-show and c-active are added: /account/
c-show and c-active are not added: /account/password/

<li class="c-sidebar-nav-dropdown">
    <a class="c-sidebar-nav-dropdown-toggle" href="#">
        <i class="far fa-user c-sidebar-nav-icon"></i>
        Account
    </a>

    <ul class="c-sidebar-nav-dropdown-items">
        <li class="c-sidebar-nav-item">
            <a class="c-sidebar-nav-link" href="/account/">
                Profile
            </a>
        </li>
    </ul>
</li>
  • Operating system and version: macOS 10.15.6
  • Browser and version: Firefox 79.0 (64-Bit)
@wittfabian wittfabian changed the title [v3-pro] c-show not set for extended path (c-sidebar-nav-dropdown) [v3-pro] c-show and c-active not set for extended path Aug 19, 2020
@mrholek
Copy link
Member

mrholek commented Sep 2, 2020

Fixed in v3.3.0

@mrholek mrholek closed this as completed Sep 2, 2020
@wittfabian
Copy link
Author

Nothing changed in https://www.npmjs.com/package/@coreui/coreui-pro v3.3.0.
Problem is still there.

@wittfabian
Copy link
Author

@mrholek Still not working! Where can I find the change?

@wittfabian
Copy link
Author

v3.4.0: Still not working!

@wittfabian
Copy link
Author

@mrholek Please reopen the issue!

@wittfabian
Copy link
Author

wittfabian commented Dec 28, 2020

I changed:

  • Default$b.activeLinksExact to false (line 9528, coreui.bundle.js)
  • element.href.startsWith(currentUrl) to currentUrl.startsWith(element.href) (line 9956, coreui.bundle.js)

Now it´s working!

@wittfabian
Copy link
Author

Same for v4.1-pro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants