Press "Enter" to skip to content

Angular Material Component For Mat-Select With Autocomplete

SelectAutocompleteApp is a project built with the Angular CLI version. Run ng to generate the component name of the component to generate a new component. You can also use  ng generate directive|pipe|service|class|guard|interface|enum|module.

mat select autocomplete stackblitz example, mat autocomplete multiple selection, mat select autocomplete angular, mat select with search, mat select autocomplete npm

jQuery Plugin for Interactive Multi-Select & Autocomplete Dropdown Lists

How to make use of it:

Installation

import { Component, ViewChild } from '@angular/core';
import { SelectAutocompleteComponent } from 'mat-select-autocomplete';
@Component({
  selector: 'my-app',
  templateUrl: './app.component.html',
  styleUrls: [ './app.component.css' ]
})
export class AppComponent  {
  @ViewChild(SelectAutocompleteComponent) multiSelect: SelectAutocompleteComponent;
  options = [
    {
      display: 'One',
      value: '1'
    }, {
      display: 'Two',
      value: '2'
    }, {
      display: 'Three',
      value: '3'
    }, {
      display: 'Four',
      value: '4'
    }, {
      display: 'Five',
      value: '5'
    }, {
      display: 'Six',
      value: '6'
    }
  ];
  selectedOptions = ['1', '2', '3', '4'];

  selected = this.selectedOptions;
  showError = false;
  errorMessage = '';

  onToggleDropdown() {
    this.multiSelect.toggleDropdown();
  }

  getSelectedOptions(selected) {
    this.selected = selected;
  }

  onResetSelection() {
    this.selectedOptions = [];
  }
}

Select Autocomplete Component, SelectAutocompleteApp Plugin/Github, angular autocomplete dropdown stackblitz, mat select autocomplete angular


See Demo And Download

Official Website(malothnaresh): Click Here

This superior jQuery/javascript plugin is developed by malothnaresh. For extra Advanced usage, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *