I'm implementing an app with plenty of tables that works with the react-router perfectly, reading the URL query etc.
Now I need to put one of the tables inside a modal (I'm using AntUI Modal component for this purpose). From this table I can change the URL query in the browser by using history
:
import createHistory from 'history/createBrowserHistory';
export const history = createHistory()
...
history.push({ search: 'my search here' });
The problem is that the URL changes are not visible for the table inside the modal. I've tried wrapping the component in withRouter
HOC but it did not help, so I assume that the problem is that the modal is not laying inside the <Router>
component.
Can it be easily fixed? Or maybe my whole thought process is wrong?