Skip to content

Commit

Permalink
Stop table refreshes on GNIS dropdown expansions
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasThelen committed Jun 13, 2023
1 parent 92a362b commit e4a7806
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/facets/facets.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
border-radius: 0 5px 5px 0;
color: #fff;
cursor: pointer;
width: 30%
width: 30%;
}

.facet {
Expand Down
6 changes: 6 additions & 0 deletions src/app/facets/facets.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> = []
node_ids.forEach((node) => {
nodes.push(this.gnisTree.treeModel.getNodeById(node[0]))
Expand Down

0 comments on commit e4a7806

Please sign in to comment.