From 2d805e3936f8f8035b38105e628844bc697191a2 Mon Sep 17 00:00:00 2001 From: Henry Whitaker Date: Sat, 8 Aug 2020 23:33:23 +0100 Subject: [PATCH] Fixed issue with widgets not updating Wouldn't refresh when successful->failed test or failed->successful --- resources/js/components/Graphics/Widget.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/js/components/Graphics/Widget.js b/resources/js/components/Graphics/Widget.js index 6639722a..8453fe2b 100644 --- a/resources/js/components/Graphics/Widget.js +++ b/resources/js/components/Graphics/Widget.js @@ -18,14 +18,15 @@ export default class Widget extends Component { } componentDidUpdate = () => { - if(this.props.title != this.state.title || this.props.value != this.state.value || this.props.unit != this.state.unit || this.props.icon != this.state.icon || this.props.avg != this.state.avg || this.props.max != this.state.max) { + if(this.props.title != this.state.title || this.props.value != this.state.value || this.props.unit != this.state.unit || this.props.icon != this.state.icon || this.props.avg != this.state.avg || this.props.max != this.state.max || this.props.failed != this.state.failed) { this.setState({ title: this.props.title, value: this.props.value, unit: this.props.unit, icon: this.props.icon, avg: this.props.avg, - max: this.props.max + max: this.props.max, + failed: this.props.failed, }); } }