
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
autocomplete-entry
Advanced tools
This Angular Component (Module) allows you to have an autocomplete or select menu. You can provide an array of objects or an Observable array of objects
This Angular Module (Component) allows you to have an autocomplete or select menu. You can provide an array of objects or an Observable array of objects. This formControl will return the selected or entered item. Blur and Enter also have been implemented.
npm install autocomplete-entry
Import the module into your project under imports
imports: [
BrowserModule,
AppRoutingModule,
AutocompleteEntryModule
],
To use in your component, use the following tag
<app-autocomplete-selection></app-autocomplete-selection>
data STRING[] Data for autocomplete STRING[] | Observable autocomplete TRUE - Auto Filter Complete Entry FALSE - Standard Dropdown Menu BOOLEAN placeholder inside label for the input field STRING label label for the fiels STRING
required Add validation for required BOOLEAN appearance Input Field Appearance STRING (outline, filled) style Styles for input field STRING - ex: width:400px; color:red
Here is an example
<wav-autocomplete-selection
formControlName="country"
[data]="countries"
[autocomplete]="true"
[placeholder]="'Canada'"
[label]="'Country'"
></wav-autocomplete-selection>
Here is an example with 2 autocomplete types and different options. The button will display in the console the selection whether its entered or selected.
<div [formGroup]="autoForm" style="padding: 24px;">
<wav-autocomplete-selection
formControlName="country1"
[data]="countries"
[autocomplete]="true"
[required]="true"
[appearance]="'outline'"
[style]="'width:400px; color:red'"
[placeholder]="'Canada'"
[label]="'Country'"
></wav-autocomplete-selection>
<wav-autocomplete-selection
formControlName="country2"
[data]="countries"
[autocomplete]="false"
[required]="false"
[appearance]="'outline'"
[style]="'width:400px; color:red'"
[placeholder]="'Canada'"
[label]="'Country'"
></wav-autocomplete-selection>
<button mat-button (click)="onSubmit()">Submit</button>
</div>
In the component we define the menu's contents and define the form
countries = ['Canada', 'United States', 'Russia', 'China']
country = ''
autoForm = this.fb.group({
country1: [null], country2: [null]
})
The onSubmit action connectd to the button click event
onSubmit() {
this.autoForm.markAllAsTouched()
if(this.autoForm.valid) console.log('valid:',this.autoForm.value)
console.log(this.autoForm.value, this.autoForm.valid)
}
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 1 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.