awslabs / iot-app-kit

A development library for creating web applications to visualize industrial data
Apache License 2.0
119 stars 61 forks source link

fix(react-components): ensure enabled flag is never undefined for queries #2974

Closed jmbuss closed 2 months ago

jmbuss commented 2 months ago

Overview

Bug fix for queries status. The enabled flag was possibly undefined due to the value of the sync variable. enabled = undefined is defaulted to true in react-query, meaning that the query could be enabled and disabled for a frame. This would allow the query to move from an idle fetch state into a fetching fetch state, causing the query to read as a status of loading even if that is not possible given the invariants.

Legal

This project is available under the Apache 2.0 License.