src/app/components/set-editor/set-editor.component.ts
The set editor displays and edits a list of items (used in the issue detail sidebar).
selector | app-set-editor |
styleUrls | ./set-editor.component.scss |
templateUrl | ./set-editor.component.html |
Methods |
Inputs |
Outputs |
Accessors |
constructor(dataService: DataService, dialogService: MatDialog)
|
|||||||||
Parameters :
|
applyChangeset | |
Type : function
|
|
Callback for applying a changeset to the listSet. |
createItem | |
Type : function
|
|
Callback to create a new item (enabled using itemOps). If the promise returns a node ID, it will be added to the set. |
editable | |
Type : boolean
|
|
Default value : true
|
|
Set editable to false to just display items in the set, without being able to edit them. |
emptyResultsLabel | |
Type : string
|
|
Default value : 'No results'
|
|
Set to override the “no results” text in the dialog. Appears when there is a search query. |
emptySuggestionsLabel | |
Type : string
|
|
Default value : 'No suggestions'
|
|
Set to override the “no results” text in the dialog. Appears only when there is no search query. |
hydrate | |
Type : Promise<HydrateList<T>>
|
|
Pass a HydrateList object to load the listSet with existing data instead of sending a request to the server. |
itemOps | |
Type : ItemOps
|
|
Default value : 'none'
|
|
Additional operations available from the set editor. |
listAll | |
Type : ListId | SetMultiSource
|
|
The list of all possible items. Should be a superset of listSet, as otherwise the user may not be able to deselect items. |
listSet | |
Type : ListId | NodeId[]
|
|
The list that contains all nodes that are part of the set. string[] is treated as local state. |
makeFilter | |
Type : function
|
|
Callback for making a filter for the given search query. |
scoreKeys | |
Type : string[]
|
|
Object keys used for scoring a search result. (e.g. 'title') Should correspond to fields searched in makeFilter. |
deleteItem | |
Type : EventEmitter
|
|
Callback to delete an item. |
editItem | |
Type : EventEmitter
|
|
Callback to edit an item. |
beginEditing |
beginEditing()
|
Opens the editor dialog.
Returns :
void
|
totalCount |
gettotalCount()
|
Returns the number of selected items. May be NaN if it hasn't been loaded yet.
Returns :
number
|
./set-editor.component.scss