mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-30 03:00:57 +00:00
fix: quick fix to lower case error
This commit is contained in:
parent
150bf7dbb8
commit
4a7cdcb11a
1 changed files with 6 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ export class ChipListInputComponent {
|
|||
separatorKeysCodes: number[] = [ENTER, COMMA];
|
||||
|
||||
filteredSuggestions: Observable<Suggestion[]> = this.inputCtrl.valueChanges.pipe(
|
||||
startWith([null]),
|
||||
startWith(''),
|
||||
map((val: string | null) => val
|
||||
? this._filter(val)
|
||||
: this.suggestions_.filter(suggestion => !this._modelIds || !this._modelIds.includes(suggestion.id)))
|
||||
|
|
@ -120,9 +120,13 @@ export class ChipListInputComponent {
|
|||
}
|
||||
|
||||
private _filter(val: string): Suggestion[] {
|
||||
if (!val || val === null) {
|
||||
return this.suggestions_;
|
||||
}
|
||||
|
||||
const filterValue = val.toLowerCase();
|
||||
return this.suggestions_.filter(
|
||||
suggestion => suggestion.title.toLowerCase().indexOf(filterValue) === 0
|
||||
suggestion => suggestion && suggestion.title.toLowerCase().indexOf(filterValue) === 0
|
||||
&& !this._modelIds.includes(suggestion.id)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue