REQUEST A LIVE DEMO

Facet Model

dragonGlass.FacetModel

Description:

An auto-updating store of Facets. Reacts to searches and automatically updates facets and notifies listeners. Uses a dragonGlass.FacetCustomizer to decorate facet results with display names for facets and terms.

Constructor

    
FacetModel({ engine : engine, customizer : new FacetCustomizer() });

Methods

    
onResultsLoaded()

Fires:

event:dg-before-facet-search
event:dg-facet-results-loaded


    
setTermSelected(term, selected)

Parameters:

Name Type
term string
selected object

    
shouldUpdateFacets(query) -> {Boolean}

Parameters:

Name Type
query string