AG-2177 React Example - allow force refresh (routing breaks)

This commit is contained in:
Sean Landsman
2018-10-16 16:07:35 +01:00
parent 3debbabe28
commit 518a95ee89
5 changed files with 9 additions and 4 deletions

View File

@@ -46,5 +46,6 @@ module.exports = {
},
devServer: {
port: 8080,
historyApiFallback: true
}
};

View File

@@ -8,7 +8,7 @@ import SimpleReduxDynamicExample from "./simpleReduxDynamicComponentExample/Simp
const SideBar = () => (
<div style={{float: "left", width: 335, marginRight: 25}}>
<ul className="nav nav-pills nav-stacked">
<ul className="nav nav-pills">
<NavItem to='/rich-grid-declarative'>Rich Grid with Declarative Markup</NavItem>
<NavItem to='/simple-redux-dynamic'>Simple Redux Dynamic Component Example</NavItem>
</ul>

View File

@@ -6,8 +6,8 @@ import {Link, Route} from 'react-router-dom'
export default function NavItem({children, to, exact}) {
return (
<Route path={to} exact={exact} children={({match}) => (
<li className={match ? 'active' : null}>
<Link to={to}>{children}</Link>
<li className="nav-item">
<Link className={match ? 'nav-link active' : 'nav-link'} to={to}>{children}</Link>
</li>
)}/>
)

View File

@@ -16,6 +16,10 @@
line-height: 1
}
h1 {
font-size: 1.5rem;
}
div.card-body > a {
margin-top: 5px
}

View File

@@ -232,7 +232,7 @@ export default class RichGridDeclarativeExample extends Component {
</AgGridColumn>
</AgGridReact>
</div>
<div>
<div style={{marginTop: 10}}>
<div className="row">
<div className="col-sm-12"><h1>Rich Grid with Declarative Markup Example</h1></div>
</div>