Skip to content

Disabled Nav Item #106

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

Closed
rfaloisio opened this issue Aug 21, 2018 · 3 comments · Fixed by #128
Closed

Disabled Nav Item #106

rfaloisio opened this issue Aug 21, 2018 · 3 comments · Fixed by #128

Comments

@rfaloisio
Copy link

Hey Guys!

Is there a navItem prop that makes it unclickable/disabled?

Thanks in advance!

@Haziqasyraff
Copy link

Try changing the code:

url: '#'

to:

url: '#" disabled'

@jeff-nz
Copy link

jeff-nz commented Oct 5, 2018

Hi @rfaloisio ,

Is there a navItem prop that makes it unclickable/disabled?

This is reactstrap question but i'll try my best to help out.

Yes and no.
I don't think there is a property to disable NavItem at the moment.
However, you can still make the link not clickable by adding the "disabled" attribute into NavLink instead of NavItem.

The code might look something like:

<NavItem className="px-3">
    <NavLink href="/users" disabled>Users</NavLink>
</NavItem>

or check this link out:

https://reactstrap.github.io/components/navs/

I hope it helps.

@xidedix
Copy link
Member

xidedix commented Nov 6, 2018

hi @rfaloisio @Haziqasyraff

please update:

  • @coreui/coreui to 2.1.0
  • @coreui/react to 2.1.0

usage example (_nav.js):

    {
      name: 'Disabled',
      url: '/dashboard',
      icon: 'icon-ban',
      attributes: { disabled: true },
    },

and let us know if it works for you

@xidedix xidedix mentioned this issue Nov 7, 2018
@xidedix xidedix closed this as completed Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants