LinkContainer on Pager.Item unknown prop active
Take this example for bootstrap pager:
<Pager>
{previous &&
<LinkContainer to={{ pathname: 'example/list', query: { page: (current_page-1) }}} >
<Pager.Item previous href="#">← Previous Page</Pager.Item>
</LinkContainer>
}
{next &&
<LinkContainer to={{ pathname: 'example/list', query: { page: (current_page+1) }}} >
<Pager.Item next href="#">Next Page →</Pager.Item>
</LinkContainer>
}
</Pager>
I get the below warning:
Warning: Unknown prop `active` on <a> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
in a (created by SafeAnchor)
in SafeAnchor (created by PagerItem)
in li (created by PagerItem)
in PagerItem (created by OrdersListComponent)
in LinkContainer (created by OrdersListComponent)
in ul (created by Pager)
in Pager (created by OrdersListComponent)
I believe this is an issue with react-bootstrap, not react-router-bootstrap. I filed an issue.
We should have an activePropName prop on <LinkContainer>. If this is unset, then we can avoid passing down an active prop.
Hi taion
I see the same problem for
<LinkContainer>
<Thumbnail/>
</LinkContainer>
Same here. Is there a possible workaround? For now my links acquire the active class only if the page is reloaded, if the user switches from one page to another, the navbar links do not change their active state.
See my workaround
Not getting the error as mentioned but the active item is not changing for my <Nav> component unless I refresh the page
Same here, did you try @godmar workaround?
After upgrade of react to 15.6 version I get the same error