2022-12-17 20:26:24 -08:00
< div class = "mb-3 paperless-input-select" [ class . disabled ] = " disabled " >
2022-12-09 10:04:39 -08:00
< label * ngIf = "title" class = "form-label" [ for ] = " inputId " > {{title}}< / label >
2023-05-27 23:16:33 -07:00
< div [ class . input-group ] = " allowCreateNew | | showFilter " >
2021-04-04 19:57:16 -07:00
< ng-select name = "inputId" [ ( ngModel ) ] = " value "
2021-04-03 09:30:29 -07:00
[disabled]="disabled"
[style.color]="textColor"
[style.background]="backgroundColor"
2023-03-06 16:32:20 -08:00
[class.private]="isPrivate"
2021-04-03 09:30:29 -07:00
[clearable]="allowNull"
[items]="items"
2021-04-04 19:57:16 -07:00
[addTag]="allowCreateNew & & addItemRef"
2021-05-15 18:53:55 +02:00
addTagText="Add item"
2022-05-19 23:42:25 +02:00
i18n-addTagText="Used for both types, correspondents, storage paths"
[placeholder]="placeholder"
2022-11-13 07:23:33 -08:00
[multiple]="multiple"
2022-12-07 00:36:31 -08:00
[bindLabel]="bindLabel"
2021-04-03 09:30:29 -07:00
bindValue="id"
2021-04-04 17:05:27 -07:00
(change)="onChange(value)"
(search)="onSearch($event)"
(focus)="clearLastSearchTerm()"
(clear)="clearLastSearchTerm()"
(blur)="onBlur()">
2021-04-03 09:30:29 -07:00
< / ng-select >
2022-12-07 15:46:52 -08:00
< button * ngIf = "allowCreateNew" class = "btn btn-outline-secondary" type = "button" ( click ) = " addItem ( ) " [ disabled ] = " disabled " >
2022-02-19 22:40:27 -08:00
< svg class = "buttonicon" fill = "currentColor" >
< use xlink:href = "assets/bootstrap-icons.svg#plus" / >
< / svg >
< / button >
2023-05-27 23:16:33 -07:00
< button * ngIf = "showFilter" class = "btn btn-outline-secondary" type = "button" ( click ) = " onFilterDocuments ( ) " [ disabled ] = " isPrivate | | this . value = == null " i18n-title title = "Filter documents with this {{title}}" >
< svg class = "buttonicon" fill = "currentColor" >
< use xlink:href = "assets/bootstrap-icons.svg#filter" / >
< / svg >
< / button >
2021-04-04 17:05:27 -07:00
< / div >
2020-10-28 18:02:30 +01:00
< small * ngIf = "hint" class = "form-text text-muted" > {{hint}}< / small >
2021-01-29 16:48:51 +01:00
< small * ngIf = "getSuggestions().length > 0" >
2021-01-29 16:57:00 +01:00
< span i18n > Suggestions:< / span >
2021-01-29 16:48:51 +01:00
< ng-container * ngFor = "let s of getSuggestions()" >
2022-02-17 00:16:57 +01:00
< a ( click ) = " value = s.id; onChange ( value ) " [ routerLink ] = " [ ] " > {{s.name}}< / a >
2021-01-29 16:48:51 +01:00
< / ng-container >
2021-03-24 12:21:13 -07:00
2021-01-29 16:48:51 +01:00
< / small >
2020-12-17 23:09:27 -08:00
< / div >