Merge pull request #3745 from influxdata/flux/update-yields-on-script-change

Render data when yield node receives new script
pull/10616/head
Delmer 2018-06-21 13:10:46 -04:00 committed by GitHub
commit 949151d0a2
1 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,12 @@ class YieldFuncNode extends PureComponent<Props, State> {
this.getData()
}
public componentDidUpdate(prevProps: Props) {
if (prevProps.script !== this.props.script) {
this.getData()
}
}
public render() {
const {func} = this.props
const {data} = this.state