dell / patches

Apache License 2.0
3 stars 2 forks source link

On the Catalog List, if you have multiple catalogs the code rerenders each catalog after opening a new one #15

Open grantcurell opened 11 months ago

grantcurell commented 11 months ago

This code is called:

  const componentsVersionQuery = (searchQuery) => {
    let qsParams = {};
    qsParams.search = searchQuery;
    qsParams.versionQuery = props.xmlFileName;
    return http
      .get(`/api/components?${qs.stringify(qsParams)}`)
      .then((res) => {
        setData(res.components);
      });
  };

for each catalog in the list of catalogs even if one or more of them are already open. It should only call that for the unopened leaf.

It is also called unnecessarily when closing the leaf.