Commit eea88f9c authored by Edu Trevisan's avatar Edu Trevisan

Remove cache service worker and fix table not loading data on mount

parent f6458be4
{
"python.pythonPath": "/usr/bin/python3"
}
\ No newline at end of file
......@@ -58,6 +58,13 @@ class Table extends Component {
this.loadExtraHeader = this.loadExtraHeader.bind(this);
}
componentDidMount() {
var data = this.loadBody();
var header = this.loadHeader();
if (data) this.setState({ data: data });
if (header) this.setState({ headers: header });
}
componentDidUpdate(prevProps) {
if(this.props !== prevProps) {
var data = this.loadBody();
......@@ -67,7 +74,7 @@ class Table extends Component {
}
prevProps = null;
}
render() {
return (
<div className={this.props.divClasses}>
......
......@@ -24,7 +24,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
// import registerServiceWorker from './registerServiceWorker';
import { StoreProvider } from './Store';
......@@ -34,4 +34,4 @@ ReactDOM.render(
</StoreProvider>,
document.getElementById('root')
);
registerServiceWorker();
// registerServiceWorker();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment