How can I replace a with of react-router-dom, in ag-grid. It is making the page reload instead of pretending to be a single page application.
I have tried with this but it doesn't work
cellRenderer: (params)=> {
return <Link to={`/?info=${params.data.Id}`}>"+{params.value}+"</Link>,
Is there a possibility that we can use Link instead of
cellRenderer: function(params){
return "<a href='/?info=" + params.data.Id+ "'>"+params.value+"</a>";},
when using Link it is throwing the Error:
Error: ag-Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, eg instead of api.refreshView(), call setTimeout(function(){api.refreshView(),0}). To see what part of your code that caused the refresh check this stacktrace.
The error in stacktrace points to the code below, But with element it works fine:
===> GetAPI(){ var url = xxxxxxxxxxx; axios.get(url).then(response => { if (response.status == 200) { this.setState({ patients: response.data, loading: false }); } }) .catch(e => console.log('Error While Fetching Fee List: at Listing/index.js > Error: ', e.message,'\n for user : ',this.props.auth.user.email)) }.