autocomplete-entry
Advanced tools
Comparing version 3.3.1 to 3.3.2
@@ -129,4 +129,13 @@ (function (global, factory) { | ||
AutocompleteEntryComponent.prototype.writeValue = function (value) { | ||
this.selectedItem.patchValue(value, { emitEvent: false }); | ||
this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
var _this = this; | ||
if (this.returnKey) { | ||
this.findReturnKeySelection(value).subscribe(function (value) { | ||
_this.selectedItem.patchValue(value, { emitEvent: false }); | ||
_this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
}); | ||
} | ||
else { | ||
this.selectedItem.patchValue(value, { emitEvent: false }); | ||
this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
} | ||
}; | ||
@@ -176,3 +185,3 @@ AutocompleteEntryComponent.prototype.registerOnChange = function (fn) { | ||
if (_this.key && _this.hasObjects) { | ||
var found = obj.find(function (obj) { return (obj[_this.key]).toLocaleLowerCase() === value.toLocaleLowerCase(); }); | ||
var found = obj.find(function (obj) { return (obj[_this.key]).toLocaleLowerCase() === (value).toString().toLocaleLowerCase(); }); | ||
return (found) ? (_this.returnKey) ? found[_this.returnKey] : value : (_this.acceptInput) ? value : null; | ||
@@ -211,2 +220,17 @@ } | ||
}; | ||
AutocompleteEntryComponent.prototype.findReturnKeySelection = function (value) { | ||
var _this = this; | ||
return this._data.pipe(operators.take(1), operators.map(function (obj) { | ||
if (!value) | ||
value = ''; | ||
var key = (_this.returnKey) ? _this.returnKey : _this.key; | ||
if (key && _this.hasObjects) { | ||
var found = obj.find(function (obj) { return (obj[key]).toString().toLocaleLowerCase() === (value).toString().toLocaleLowerCase(); }); | ||
return (found) ? (_this.returnKey) ? found[_this.key] : value : (_this.acceptInput) ? value : null; | ||
} | ||
else { | ||
return obj.find(function (obj) { return obj.toLocaleLowerCase() === value.toLocaleLowerCase(); }); | ||
} | ||
})); | ||
}; | ||
return AutocompleteEntryComponent; | ||
@@ -213,0 +237,0 @@ }()); |
@@ -97,4 +97,12 @@ import { Component, forwardRef, Input } from '@angular/core'; | ||
writeValue(value) { | ||
this.selectedItem.patchValue(value, { emitEvent: false }); | ||
this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
if (this.returnKey) { | ||
this.findReturnKeySelection(value).subscribe(value => { | ||
this.selectedItem.patchValue(value, { emitEvent: false }); | ||
this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
}); | ||
} | ||
else { | ||
this.selectedItem.patchValue(value, { emitEvent: false }); | ||
this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
} | ||
} | ||
@@ -142,3 +150,3 @@ registerOnChange(fn) { | ||
if (this.key && this.hasObjects) { | ||
const found = obj.find(obj => (obj[this.key]).toLocaleLowerCase() === value.toLocaleLowerCase()); | ||
const found = obj.find(obj => (obj[this.key]).toLocaleLowerCase() === (value).toString().toLocaleLowerCase()); | ||
return (found) ? (this.returnKey) ? found[this.returnKey] : value : (this.acceptInput) ? value : null; | ||
@@ -175,2 +183,16 @@ } | ||
} | ||
findReturnKeySelection(value) { | ||
return this._data.pipe(take(1), map(obj => { | ||
if (!value) | ||
value = ''; | ||
const key = (this.returnKey) ? this.returnKey : this.key; | ||
if (key && this.hasObjects) { | ||
const found = obj.find(obj => (obj[key]).toString().toLocaleLowerCase() === (value).toString().toLocaleLowerCase()); | ||
return (found) ? (this.returnKey) ? found[this.key] : value : (this.acceptInput) ? value : null; | ||
} | ||
else { | ||
return obj.find(obj => obj.toLocaleLowerCase() === value.toLocaleLowerCase()); | ||
} | ||
})); | ||
} | ||
} | ||
@@ -222,2 +244,2 @@ AutocompleteEntryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AutocompleteEntryComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); | ||
}] } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b2NvbXBsZXRlLWVudHJ5LmNvbXBvbmVudC5qc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biAgICA8bWF0LWxhYmVsICpuZ0lmPVwibGFiZWxcIj57eyBsYWJlbCB9fTwvbWF0LWxhYmVsPlxuXG4gICAgPG1hdC1zZWxlY3QgW2Zvcm1Db250cm9sXT1cInNlbGVjdGVkSXRlbURyb3BEb3duXCI+XG4gICAgICA8bWF0LW9wdGlvblxuICAgICAgICAqbmdGb3I9XCJsZXQgaXRlbSBvZiAoZGF0YSB8IGFzeW5jKVwiXG4gICAgICAgIFt2YWx1ZV09XCJpdGVtXCJcbiAgICAgID5cbiAgICAgICAge3tpdGVtfX1cbiAgICAgIDwvbWF0LW9wdGlvbj5cbiAgICA8L21hdC1zZWxlY3Q+XG5cbiAgPC9tYXQtZm9ybS1maWVsZD5cblxuPC9kaXY+XG4iXX0= |
@@ -104,4 +104,12 @@ import * as i0 from '@angular/core'; | ||
writeValue(value) { | ||
this.selectedItem.patchValue(value, { emitEvent: false }); | ||
this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
if (this.returnKey) { | ||
this.findReturnKeySelection(value).subscribe(value => { | ||
this.selectedItem.patchValue(value, { emitEvent: false }); | ||
this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
}); | ||
} | ||
else { | ||
this.selectedItem.patchValue(value, { emitEvent: false }); | ||
this.selectedItemDropDown.patchValue(value, { emitEvent: false }); | ||
} | ||
} | ||
@@ -149,3 +157,3 @@ registerOnChange(fn) { | ||
if (this.key && this.hasObjects) { | ||
const found = obj.find(obj => (obj[this.key]).toLocaleLowerCase() === value.toLocaleLowerCase()); | ||
const found = obj.find(obj => (obj[this.key]).toLocaleLowerCase() === (value).toString().toLocaleLowerCase()); | ||
return (found) ? (this.returnKey) ? found[this.returnKey] : value : (this.acceptInput) ? value : null; | ||
@@ -182,2 +190,16 @@ } | ||
} | ||
findReturnKeySelection(value) { | ||
return this._data.pipe(take(1), map(obj => { | ||
if (!value) | ||
value = ''; | ||
const key = (this.returnKey) ? this.returnKey : this.key; | ||
if (key && this.hasObjects) { | ||
const found = obj.find(obj => (obj[key]).toString().toLocaleLowerCase() === (value).toString().toLocaleLowerCase()); | ||
return (found) ? (this.returnKey) ? found[this.key] : value : (this.acceptInput) ? value : null; | ||
} | ||
else { | ||
return obj.find(obj => obj.toLocaleLowerCase() === value.toLocaleLowerCase()); | ||
} | ||
})); | ||
} | ||
} | ||
@@ -184,0 +206,0 @@ AutocompleteEntryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AutocompleteEntryComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); |
@@ -53,4 +53,5 @@ import { OnInit } from '@angular/core'; | ||
private updateDisplay; | ||
private findReturnKeySelection; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteEntryComponent, never>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteEntryComponent, "wav-autocomplete-entry", never, { "data": "data"; "disabled": "disabled"; "default": "default"; "autocomplete": "autocomplete"; "required": "required"; "appearance": "appearance"; "styles": "styles"; "placeholder": "placeholder"; "label": "label"; "prefix": "prefix"; "minlen": "minlen"; "maxlen": "maxlen"; "sortAlpha": "sortAlpha"; "key": "key"; "returnKey": "returnKey"; "displayInput": "displayInput"; "acceptInput": "acceptInput"; }, {}, never, never>; | ||
} |
{ | ||
"name": "autocomplete-entry", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "This Angular Material Component (Module) allows you to have an autocomplete or dropdown menu. You can provide an array of objects or an Observable array of objects", | ||
@@ -5,0 +5,0 @@ "author": "Mike Boni <wavecoders@gmail.com> (http://wavecoders.ca)", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
123958
1046