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

Not able to pass Query Params in nav #90

Closed
mdhanju opened this issue Oct 1, 2019 · 1 comment
Closed

Not able to pass Query Params in nav #90

mdhanju opened this issue Oct 1, 2019 · 1 comment

Comments

@mdhanju
Copy link

mdhanju commented Oct 1, 2019

https://github.com/coreui/coreui-react/blob/master/demo/src/_nav.js#L4

www.domain.com/dashboard
Current

    {
      name: 'Dashboard',
      url: '/dashboard',
      icon: 'cui-speedometer icons',
      badge: {
        variant: 'info',
        text: 'NEW'
      }
    },

Expected
www.domain.com/dashboard?name=search&period=today

    {
      name: 'Dashboard',
      url: '/dashboard',
      icon: 'cui-speedometer icons',
      badge: {
        variant: 'info',
        text: 'NEW'
      },
     queryParam: {
        name: 'search',
        period: 'today'
      }
    },
@xidedix
Copy link
Member

xidedix commented Oct 3, 2019

Hi @mdhanju

  • please update @coreui/react to ^2.5.4
  • from now on you can pass an url as a string or as an object like below:
{
  name: 'Dashboard',
  url: { 
    pathname: '/dashboard', 
    search: '?name=search&period=today', 
    state: { fromDashboard: true }
  },
  icon: 'icon-speedometer',
  attributes: { 
    replace: true, 
    activeStyle: { textTransform: 'uppercase' }, 
    id: 'link-1', 
    title: 'Dashboard', 
  }
}

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

3 participants