@webilix/ngx-form-m3 0.0.43 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,7 @@ import * as i3$1 from '@angular/material/menu';
|
|
|
24
24
|
import { MatMenuModule } from '@angular/material/menu';
|
|
25
25
|
import * as i4 from '@angular/material/select';
|
|
26
26
|
import { MatSelectModule } from '@angular/material/select';
|
|
27
|
-
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
27
|
+
import { ENTER, COMMA, PERIOD } from '@angular/cdk/keycodes';
|
|
28
28
|
import * as i3$2 from '@angular/material/chips';
|
|
29
29
|
import { MatChipsModule } from '@angular/material/chips';
|
|
30
30
|
import * as i1$5 from '@angular/router';
|
|
@@ -1761,15 +1761,16 @@ class InputTagComponent {
|
|
|
1761
1761
|
config = inject(INPUT_CONFIG);
|
|
1762
1762
|
values;
|
|
1763
1763
|
isButtonDisabled;
|
|
1764
|
-
separatorKeysCodes = [ENTER, COMMA];
|
|
1764
|
+
separatorKeysCodes = [ENTER, COMMA, PERIOD];
|
|
1765
1765
|
inputValue = model('', ...(ngDevMode ? [{ debugName: "inputValue" }] : []));
|
|
1766
1766
|
tags = Array.isArray(this.formControl.value) ? this.formControl.value : [];
|
|
1767
1767
|
filteredTags = computed(() => {
|
|
1768
|
-
|
|
1769
|
-
const options = this.input.tags
|
|
1768
|
+
let options = this.input.tags
|
|
1770
1769
|
.filter((tag) => !this.tags.includes(tag))
|
|
1771
|
-
.filter((t, i, a) => a.indexOf(t) === i)
|
|
1772
|
-
|
|
1770
|
+
.filter((t, i, a) => a.indexOf(t) === i);
|
|
1771
|
+
if (this.input.orderList)
|
|
1772
|
+
options = options.sort((t1, t2) => t1.localeCompare(t2));
|
|
1773
|
+
const value = this.inputValue().toLowerCase();
|
|
1773
1774
|
return value ? options.filter((option) => option.toLowerCase().includes(value)) : options;
|
|
1774
1775
|
}, ...(ngDevMode ? [{ debugName: "filteredTags" }] : []));
|
|
1775
1776
|
setValues() {
|