src/app/components/set-editor/set-editor-dialog.component.ts
This is an internal component used to load data from multiple sources and through a layer of indirection (also see SetMultiSource).
Properties |
|
Methods |
constructor(spec: SetMultiSource, scoreKeys: string[], dataService: DataService)
|
||||||||||||
Parameters :
|
Public hasMore |
Default value : false
|
If true, there are more than |
Public limit |
Type : number
|
Default value : 10
|
Max number of items in results. |
Public query |
Type : string
|
Default value : ''
|
Current search query. Used to rank results by relevance. The filters are computed separately! Use #setFilter to set both simultaneously. |
Public Optional results |
Type : T[]
|
Current results. |
Public scoreKeys |
Type : string[]
|
Public Optional sourceNodeList |
Type : DataList<literal type | >
|
A DataList that loads the value of sourceNodes, if it's a ListId. |
Public sources |
Type : Map<ListIdEnc | DataList<T, F>>
|
Default value : new Map()
|
List of all sources that will be included in the results. |
Public spec |
Type : SetMultiSource
|
Public Optional staticSourceNodeList |
Type : NodeId[]
|
The list of nodes specified in sourceNodes, if it's a NodeId[]. |
Static fromSingleList | ||||||||||||
fromSingleList(list: ListId, scoreKeys: string[], dataService: DataService)
|
||||||||||||
Type parameters :
|
||||||||||||
Creates a new MultiSourceList that actually just loads a single list.
Parameters :
Returns :
MultiSourceList<T, F>
|
isLoading |
isLoading()
|
If true, something is loading somewhere.
Returns :
boolean
|
score | ||||||
score(item: T)
|
||||||
Scores an item for ranking in results.
Parameters :
Returns :
any
|
setFilter | |||||||||
setFilter(query: string, filter: F)
|
|||||||||
Sets a filter on all lists.
Parameters :
Returns :
void
|
unsubscribe |
unsubscribe()
|
Unsubscribes from all subscriptions. This object should no longer be used afterwards.
Returns :
void
|
update |
update()
|
Updates lists.
Returns :
void
|
updateResults |
updateResults()
|
Updates the results array from loaded data.
Returns :
void
|