diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-11 09:22:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-08-11 09:41:55 +0200 |
commit | 9abd170dec9a0b929da1f0947e3c7019e38631da (patch) | |
tree | d43418b375d306dcf96af1e9c2f8b6a6775e6e22 /client/src/app/shared/shared-forms/select-tags.component.ts | |
parent | 02c01341f4dae30ec6b81fcb644952393d73c4a8 (diff) | |
download | PeerTube-9abd170dec9a0b929da1f0947e3c7019e38631da.tar.gz PeerTube-9abd170dec9a0b929da1f0947e3c7019e38631da.tar.zst PeerTube-9abd170dec9a0b929da1f0947e3c7019e38631da.zip |
Fix tags in search filters
Diffstat (limited to 'client/src/app/shared/shared-forms/select-tags.component.ts')
-rw-r--r-- | client/src/app/shared/shared-forms/select-tags.component.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-forms/select-tags.component.ts b/client/src/app/shared/shared-forms/select-tags.component.ts index 2e07d7e8f..a8a19d788 100644 --- a/client/src/app/shared/shared-forms/select-tags.component.ts +++ b/client/src/app/shared/shared-forms/select-tags.component.ts | |||
@@ -14,14 +14,14 @@ import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms' | |||
14 | ] | 14 | ] |
15 | }) | 15 | }) |
16 | export class SelectTagsComponent implements ControlValueAccessor { | 16 | export class SelectTagsComponent implements ControlValueAccessor { |
17 | @Input() items: string[] = [] | 17 | @Input() availableItems: string[] = [] |
18 | @Input() _items: string[] = [] | 18 | @Input() selectedItems: string[] = [] |
19 | 19 | ||
20 | propagateChange = (_: any) => { /* empty */ } | 20 | propagateChange = (_: any) => { /* empty */ } |
21 | 21 | ||
22 | writeValue (items: string[]) { | 22 | writeValue (items: string[]) { |
23 | this._items = items | 23 | this.selectedItems = items |
24 | this.propagateChange(this._items) | 24 | this.propagateChange(this.selectedItems) |
25 | } | 25 | } |
26 | 26 | ||
27 | registerOnChange (fn: (_: any) => void) { | 27 | registerOnChange (fn: (_: any) => void) { |
@@ -33,6 +33,8 @@ export class SelectTagsComponent implements ControlValueAccessor { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | onModelChange () { | 35 | onModelChange () { |
36 | this.propagateChange(this._items) | 36 | console.log(this.selectedItems) |
37 | |||
38 | this.propagateChange(this.selectedItems) | ||
37 | } | 39 | } |
38 | } | 40 | } |