Issue: componentDidUpdate()
susannachan98 opened this issue · comments
I'm having the same issue
Unfortunately have not found a fix yet
@rkrahulmishra887
Hi there, would you be able to assist? It looks like you were helping out with other issues on this task.
I tried copying the node_modules from Task 2 into my directory for Task 3.
Separately in Graph.tsx, I also tried changing the reference path for { Table } to '@finos/perspective';
I still get an error on componentDidUpdate()
Thanks Rahul @rkrahulmishra887, unfortunately, it cannot find the Table module from @jpmorganchase/perspective.
Please see the screenshots below.
Is there something else wrong with my setup?
I cloned the python3 repo, and am using python 3.7 to run npm start.
I also copied the node_modules folder from Task 2 into Task 3.
import { Table } from '@finos/perspective';
I was able to resolve it by: also importing TableData from '@finos/perspective' and adding as unknown as TableData
near the end of componentDidUpdate method:
import { Table, TableData } from '@finos/perspective';
componentDidUpdate() {
if (this.table) {
this.table.update([
DataManipulator.generateRow(this.props.data),
] as unknown as TableData);
}
}