From e4a7806ea1387b82768dbc25125ff0b188b7de84 Mon Sep 17 00:00:00 2001 From: thomasthelen Date: Mon, 5 Jun 2023 09:56:30 -0700 Subject: [PATCH] Stop table refreshes on GNIS dropdown expansions --- src/app/facets/facets.component.scss | 2 +- src/app/facets/facets.component.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/facets/facets.component.scss b/src/app/facets/facets.component.scss index d721ad6b..0bcf2899 100644 --- a/src/app/facets/facets.component.scss +++ b/src/app/facets/facets.component.scss @@ -32,7 +32,7 @@ border-radius: 0 5px 5px 0; color: #fff; cursor: pointer; - width: 30% + width: 30%; } .facet { diff --git a/src/app/facets/facets.component.ts b/src/app/facets/facets.component.ts index 19d022af..c2824aa6 100644 --- a/src/app/facets/facets.component.ts +++ b/src/app/facets/facets.component.ts @@ -439,10 +439,16 @@ export class FacetsComponent implements OnInit { /** * Handles the event when the state of the GNIS tree changes + * + * @param $event: The event fired from the dropdown on a state change */ gnisFacetChange($event) { // Check to see if any nodes were selected. let node_ids = this.getSelectedNodes(this.gnisTree.treeModel, false) + // If there aren't any focused nodes, then return early to avoid a table refresh + if (!$event.focusedNodeId) { + return + } let nodes: Array = [] node_ids.forEach((node) => { nodes.push(this.gnisTree.treeModel.getNodeById(node[0]))