Closed vickyvishal closed 4 years ago
Do you have the code for the Widget as well?
I did not have the port widget in the model. My bad :/ . After adding there is this type error.
console.log(this.props.node.getPort(PortModelAlignment.LEFT)) -> undefined(2)
My modelWidget
Hmmm shoudn't the PortWidget
have been created with PortModelAlignment.BOTTOM
instead of LEFT
?
Hmmm shoudn't the
PortWidget
have been created withPortModelAlignment.BOTTOM
instead ofLEFT
?
Hmmmmm, and what is this.props.node.getPort(PortModelAlignment.BOTTOM)
returning? Can you log it?
Here is the log for this.props.node.getPort(PortModelAlignment.BOTTOM)
That's odd... I'm not sure what TypeScript is complaining about here :frowning_face:
Strange but I made it work by making "strict": false
in tsconfig.json . I don't know why it is working. Also can't see any type error on my IDE now :(
try with port={this.props.node.getPort(PortModelAlignment.Bottom) as YourPortModelClassHere}
for instance if you are using DefaultPortModel, then
port={this.props.node.getPort(PortModelAlignment.Bottom) as DefaultPortModel}
My error
my nodeModel
my portModel