insidesherpa / JPMC-tech-task-3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue: componentDidUpdate()

susannachan98 opened this issue · comments

螢幕擷取畫面 (393)

I haven't seen anyone else having this problem. Is there any way I could fix it?

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()

Hi you can check this out for reference
image

Hi you can check this out for reference image

Thanks Rahul @rkrahulmishra887, unfortunately, it cannot find the Table module from @jpmorganchase/perspective.
Please see the screenshots below.

image
image

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);
}
}