@grafana/plugin-ui 0.10.7 → 0.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9595,16 +9595,15 @@ const QueryBuilderHints = ({
9595
9595
  buildDataQueryFromQueryString,
9596
9596
  buildQueryStringFromDataQuery
9597
9597
  }) => {
9598
- const [hints, setHints] = React.useState([]);
9599
9598
  const styles = ui.useStyles2(getStyles$2);
9600
- React.useEffect(() => {
9599
+ const hints = React.useMemo(() => {
9601
9600
  var _a;
9602
9601
  const dataQuery = buildDataQueryFromQueryString(queryModeller.renderQuery(visualQuery));
9603
9602
  const hints2 = (_a = datasource.getQueryHints) == null ? undefined : _a.call(datasource, dataQuery, (data == null ? undefined : data.series) || []).filter((hint) => {
9604
9603
  var _a2;
9605
9604
  return (_a2 = hint.fix) == null ? undefined : _a2.action;
9606
9605
  });
9607
- setHints(hints2 != null ? hints2 : []);
9606
+ return hints2 != null ? hints2 : [];
9608
9607
  }, [datasource, visualQuery, data, queryModeller, buildDataQueryFromQueryString]);
9609
9608
  return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, hints.length > 0 && /* @__PURE__ */ React__namespace.default.createElement("div", { className: styles.container }, hints.map((hint) => {
9610
9609
  var _a, _b, _c, _d;