handleSelection()

in public/assets/js/evm.js [42:68]


	handleSelection() {
		// Turn off the 3 boxes, then turn on the used one.
		this.listingNode.style.display = "none";
		this.latestContent.style.display = "none";
		this.noResults.style.display = "none";

		// Get the currently-selected facets
		const selectedFacets = this.getSelectedFacets();
		if (selectedFacets == null) {
			// No facets selected, restore the default listing
			this.latestContent.style.display = "";
			return;
		}

		// Filter the list of resources
		const selectedResources = this.filterResources(selectedFacets);
		if (selectedResources.length > 0) {
			this.listingNode.style.display = "";
			// Re-render
			this.renderCards(selectedResources);
			return;
		}

		// We have selected facets, but there were no results. Show
		// the no results box.
		this.noResults.style.display = "";
	}