Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
autocomplete-entry
Advanced tools
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
This Material autocomplete and dropdown combined allowing you to use ether types. There are many options available as to how to display the dropdown or autocomplete behaviours. Data may be an Observable or not.
Now supports closest match!
npm install autocomplete-entry
The following Inputs are available
Input | Type | Defaut | Description |
---|---|---|---|
autocomplete | BOOLEAN | FASLE | autocomplete entry with list |
data | ANY[] | [] | data for the autocomplete list or dropdown list |
default | STRING | NULL | default selection |
key | STRING | NULL | property to use for list values (object type array) |
returnKey | STRING | NULL | property to use for return values (object type array) |
label | STRING | NULL | Label for input |
placeholder | STRING | NULL | Label for placeholder (autocomplete input) |
acceptInput | BOOLEAN | FALSE | Allow for custom entry and return value |
sortAlpha | BOOLEAN | FALSE | sort in alphabetical order |
required | BOOLEAN | FALSE | validation required |
disabled | BOOLEAN | FASLE | diable control |
style | STRING | NULL | styles to apply to formfield/select |
minLen | NUMBER | NULL | sets the min length of field |
maxLen | NUMBER | NULL | sets the max length of field |
prefix | STRING | NULL | sets a prefix string for an input field |
appearence | STRING | NULL | input style |
For a formControl you will need to provide controls for - country, region, city
formControlName="country"
countrySelection = this.fb.group({
country: [null],
})
<div style="margin: 24px;" [formGroup]="selection">
<app-autocomplete-selection
[autocomplete]="false"
[data]="autocompleteList"
[default]="'Canada'"
[key]="'name'"
[returnKey]="'abbr'"
[displayInput]="'name'"
[label]="'Country'"
[acceptInput]="true"
[placeholder]="'Canada'"
[sortAlpha]="true"
[required]="true"
[disabled]="false"
[minLength]="3"
[maxLength]="10"
formControlName="country"
>
</app-autocomplete-selection>
</div>
Provide the data ether as an Observable or Static data as an array of objects
autocompleteList = [
{ name: 'United States', id: 1, abbr: 'US'},
{ name: 'Italy', id: 1, abbr: 'IT'},
{ name: 'Canada', id: 1, abbr: 'CA'},
]
Or you can provide an array of strings
autocompleteList = ['United States', 'Italy', 'Canada']
selection: formGroup
constructor(
private fb: FormBuilder
) {}
ngOnInit() {
selection = this.fb.group({
country: [null]
})
this.selection.patchValue({ country: 'Canada'})
this.selection.valueChanges.subscribe(data => console.log(data))
}
FAQs
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
The npm package autocomplete-entry receives a total of 16 weekly downloads. As such, autocomplete-entry popularity was classified as not popular.
We found that autocomplete-entry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.