AG-2177 React Example - allow force refresh (routing breaks)
This commit is contained in:
@@ -46,5 +46,6 @@ module.exports = {
|
||||
},
|
||||
devServer: {
|
||||
port: 8080,
|
||||
historyApiFallback: true
|
||||
}
|
||||
};
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
)}/>
|
||||
)
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
line-height: 1
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
div.card-body > a {
|
||||
margin-top: 5px
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user