We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Trusted by the world’s leading companies

syncfusion trusted companies

Overview

The Angular ComboBox component is a drop-down list with an editable option that also allows users to choose an option from a predefined pop-up list. It can be used as an alternative to the HTML select tag and has several out-of-the-box features such as data binding, filtering, grouping, cascading, templates, UI customization, pop-up list customization, and more.


Angular Combo Box data binding from different data sources

Data binding

You can bind data from a variety of data sources in an array or list of primitive data, JSON data collections, or remote data sources using different kinds of adapters such as OData, OData V4, URL, JSON, and Web API.

The component uses the Essential JS 2 data manager to manage data, and also has customization options for data requests and processing.


Custom value

The editable combo box allows the entry of a custom value when the option the user searched for is not available in the pop-up list. Also, you can set a value for the combo box or get the selected value from the combo box at any time through the interactive APIs.

Angular ComboBox that allows custom values in the pop-up list


Filtering

Built-in filtering support with a rich set of filtering configurations is available to meet all your application needs.

Angular ComboBox filtering search based on custom algorithm

Custom filtering

Filter queries are customizable, and you can use your own filter libraries to filter data.

Angular ComboBox filtering with diacritic symbol sensitivity

Diacritic sensitivity

The Angular ComboBox component supports diacritic character sensitivity. This behavior can be turned on or off.

Angular ComboBox filtering with case sensitivity and minimum search characters

Filter settings

The filter search can be customized with case sensitivity, and can be performed with minimum query string characters.


Angular ComboBox Grouping of pop-up list items based on category

Grouping with category

Group the pop-up list items with a corresponding category that makes it easy for users to pick an item quickly from the drop-down, and also improves the visual experience for users.


Autofill

The autofill option allows users to easily search through options in the combo box. When a user is typing a query string to search, the available matching options will be filled automatically.

Angular ComboBox autofill option while typing


Cascading combo boxes

The Angular ComboBox component provides an option to create multiple cascading combo boxes, which helps users populate data for a child combo box based on the current selected value of the parent combo box.


Another important combo box feature is templates, which allow you to make custom appearances for the header, footer, and list items in the pop-up list.

Styling Angular ComboBox pop-up list with a header template

Header template

Design your own header for the pop-up list using a header template.

Styling Angular ComboBox pop-up list with item template

Item template

Define the appearance of each item in the pop-up list with item templates.

Styling Angular ComboBox pop-up list with footer template

Design your own custom and static footers for the pop-up list using footer templates.


Customizing the UI

You can customize each part of the combo box based on your application requirements.

Angular ComboBox pop-up list with icons

Icons in list items

Each list item can be configured to display a custom icon to improve the component’s readability and appearance.

Angular ComboBox pop-up list custom appearance when no records are found

Empty record

Configure a custom look for the pop-up list when no items are available to display.

Angular ComboBox the pop-up list dimensions customization

Customize dimensions

The dimensions of the pop-up list can be customized to fit the application.


Combo Box Angular with form validation

Forms support

Since the combo box is a form component, it supports HTML forms, template-driven forms (Angular), and reactive forms.


Mobile responsive UI

The Angular ComboBox component supports a responsive mode that provides an adaptive, redesigned UI appearance for mobile devices and touch actions.


Angular ComboBox Code Example

Easily get started with the Angular ComboBox using a few simple lines of HTML and TS code example as demonstrated below. Also explore our Angular ComboBox Example that shows you how to configure the combobox in Angular.

<div class="control-section">
    <ejs-dropdownlist id='value' #sample index='0' width='220' [dataSource]='ddlData' (change)='valueChange($event)' [fields]='fields' [popupHeight]='height'></ejs-dropdownlist>
    <span id='msg'></span>
    <br/>
    <ejs-grid #overviewgrid id='overviewgrid' [dataSource]='data' rowHeight='38' [allowSelection]='true' [allowSorting]='true' height='600' (dataBound)='onDataBound($event)' [enableHover]='false' [selectionSettings]='selectionSettings' [filterSettings]='filterSettings' [allowSorting]='true' [allowFiltering]='true' [enableVirtualization]='true'>
        <e-columns>
            <e-column type='checkbox' [allowFiltering]='false' [allowSorting]='false' width='60'></e-column>
            <e-column field='EmployeeID' [visible]='false' headerText='Employee ID' width='130' [isPrimaryKey]='true'></e-column>
            <e-column field='Employees' headerText='Employee Name' [filter]='filter' clipMode='EllipsisWithTooltip' width='200'>
                <ng-template #template let-data>
                    <div>
                        <div class="empimg">
                          <span *ngIf="data.EmployeeImg === 'usermale'" class="e-userimg sf-icon-Male">
                          </span>
                          <span *ngIf="data.EmployeeImg === 'userfemale'" class="e-userimg sf-icon-FeMale">
                        </span>
                        </div> 
                        <span id="Emptext"></span>
                      </div>                  
                </ng-template>
            </e-column>
            <e-column field='Designation' headerText='Designation' [filter]='filter' clipMode='EllipsisWithTooltip' width='170' ></e-column>
            <e-column field='Mail' headerText='Mail' [filter]='filterSettings' width='230'></e-column>
            <e-column field='Location' headerText='Location' [filter]='filter' width='140'>
                <ng-template #template let-data>
                    <div class="loc">
                        <img src="./assets/grid/images/Map.png" class="e-image" alt="" />
                        <span id="locationtext"></span>
                    </div>
                </ng-template>
            </e-column>
            <e-column field='Status' [filter]='filter' headerText='Status' width='150'>
                <ng-template #template let-data>                       
                    <div *ngIf="data.Status === 'Active';else login" class="statustemp e-activecolor">                                          
                            <span class="statustxt e-activecolor"></span>           
                    </div>
                    <ng-template #login>
                        <div class="statustemp e-inactivecolor">
                            <span class="statustxt e-inactivecolor"></span>
                        </div>
                        </ng-template>
                </ng-template>               
            </e-column>
            <e-column field='Trustworthiness' [filter]='filter' headerText='Trustworthiness' width='200'>
                <ng-template #template let-data>
                    <div class="trust">
                        <img style="width: 31px; height: 24px" src="./assets/grid/images/.png" />                        
                                <span id="Trusttext"></span>
                    </div>
                </ng-template>
            </e-column>
            <e-column field='Rating' [allowFiltering]='false' headerText='Rating' width='160'>
                <ng-template #template let-data>
                    <div class="rate">
                        <div class="rating">
                            <span *ngFor="let i of item" [ngClass]="{'checked': data.Rating >= i, 'star': true }"></span>
                        </div>
                    </div>                            
            </ng-template>
            </e-column>
            <e-column field='Software' headerText='Software' [allowSorting]='false' [allowFiltering]='false' width='180'>
                <ng-template #template let-data>
                    <div id="myProgress" class="pbar">
                        <div id="myBar"  *ngIf="data.Status === 'Inactive';" [style.width.%]= data.Software class="bar progressdisable">
                          <div id="label" class="barlabel">%</div>
                        </div>    
                        <div id="myBar"  *ngIf="data.Status === 'Active';" [style.width.%]= data.Software class="bar">
                                <div id="label" class="barlabel">%</div>
                              </div>                               
                      </div>                              
                </ng-template>
            </e-column>
            <e-column field='CurrentSalary' headerText='Current Salary' [filter]='filterSettings' format='C2' width='160'></e-column>
            <e-column field='Address' headerText='Address' [filter]='filterSettings' clipMode='EllipsisWithTooltip' width='240'></e-column>
        </e-columns>
    </ejs-grid>   
</div>
import { Component, OnInit, TemplateRef,ViewChild } from '@angular/core';
import { orderData } from './data';
import { FilterService, GridComponent,IFilter,VirtualScrollService  } from '@syncfusion/ej2-angular-grids';
import { DropDownListComponent } from '@syncfusion/ej2-angular-dropdowns';
import { CheckBox  } from '@syncfusion/ej2-buttons';
import { getData } from './data';

@Component({
    selector: 'ej-gridbatchedit',
    templateUrl: 'over-view.html',
    styleUrls: ['overview.style.css', '../../styles/Grid/style.css'],
    providers: [FilterService,VirtualScrollService]
})
export class OverViewComponent implements OnInit {   
    public dReady: boolean = false;
    public dtTime: boolean = false;
    public isDataBound: boolean = false;
    public isDataChanged: boolean = true;
    public intervalFun: any;
    public clrIntervalFun: any;
    public clrIntervalFun1: any;
    public clrIntervalFun2: any;    
    public dropSlectedIndex: number = null;
    public stTime: any;
    public data: Object;
    public filter: Object;
    public filterSettings: Object;
    public selectionSettings: Object;  
    public height: string = '240px';
    @ViewChild('sample') 
    public listObj: DropDownListComponent;
    @ViewChild('overviewgrid')
    public gridInstance : GridComponent ;  
    public ddlData: Object[] = [
        { text: '1,000 Rows and 11 Columns', value: '1000' },
        { text: '10,000 Rows and 11 Columns', value: '10000' },
        { text: '1,00,000 Rows and 11 Columns', value: '100000' }      
    ]; 
    public fields: Object = { text: 'text', value: 'value' };
    public item: number[] = [1, 2, 3, 4, 5];  

    public ngOnInit(): void {
        this.data = getData(1000);
        this.filterSettings = { type: "Menu" };      
        this.filter = { type: "CheckBox" };    
       this.stTime = performance.now();
        this.selectionSettings = {persistSelection: true, type: "Multiple", checkboxOnly: true };
       
    }
    
    ngAfterViewInit(args: any): void {
        this.gridInstance.on('data-ready', function () {
            this.dReady = true;
        });
        document.getElementById('overviewgrid').addEventListener('DOMSubtreeModified', () => {  
            if (this.stTime && this.isDataChanged) {
                let msgEle = document.getElementById('msg');
                let val: any = (performance.now() - this.stTime).toFixed(0);
                this.stTime = null;                
                this.dtTime = false;
                this.isDataChanged = false;
                msgEle.innerHTML = 'Load Time: ' + "<b>" + val + "</b>" + '<b>ms</b>';
                msgEle.classList.remove('e-hide')
           }
            })
    }
    valueChange(args:any): void {
		this.listObj.hidePopup();	
        this.gridInstance.showSpinner();
        this.dropSlectedIndex = null;
         let index: number = this.listObj.value as number;         
         clearTimeout(this.clrIntervalFun2);
         this.clrIntervalFun2 = setTimeout(() => {
             this.isDataChanged = true;
             this.stTime = null;
             let contentElement: Element = this.gridInstance.contentModule.getPanel().firstChild as Element;
             contentElement.scrollLeft = 0;
             contentElement.scrollTop = 0;
             this.gridInstance.pageSettings.currentPage = 1;
             this.stTime = performance.now();
             this.gridInstance.dataSource = getData(index);
             this.gridInstance.hideSpinner();     
         }, 100);
    }
    onDataBound(args:any):void {
        clearTimeout(this.clrIntervalFun);
        clearInterval(this.intervalFun);
        this.dtTime = true;
    }
    
}

Other supported frameworks

ComboBox is also available in Blazor, React, Vue, and JavaScript frameworks. Check out the different ComboBox platforms from the links below,

Web accessibility

  • Fully supports WAI-ARIA accessibility guidelines to work with screen readers and assistive devices.

  • Follows WAI-ARIA best practices for implementing keyboard interaction.

  • Designs the UI element visuals such as foreground color, background color, line spacing, text, and images based on WCAG 2.0 standard.

  • Supports right-to-left (RTL) direction for users working in right-to-left languages like Hebrew, Arabic, or Persian.

Developer friendly APIs

Developers can customize all UI elements and control their behaviors according to the end user’s requirements using its rich set of client-side APIs.



65+ ANGULAR UI COMPONENTS

Read independent,
authenticated reviews
on G2

Download Now Pricing

What do our customers say about us?

double quotes

Using Syncfusion Angular and JavaScript controls makes front-end web development a piece of cake. Each component has many properties that can be configured as per your desire, methods that can be used to interact with the element, and a lot of events that trigger at different stages, which makes modifying your components according to the state of the application an easy task. Also, their support is amazing! They always offer a sample working project, which makes it very simple to solve your question about your code.
Carlos Rodriguez Garcia

Carlos Rodriguez Garcia

Vistatec

double quotes

We started using Syncfusion Angular controls for the Scheduler to offer our providers a way to schedule their availability and automate our administrative process to show availability and gaps in schedules. This helped us provide the best user experience and deliver care to our patients in a timely manner.
Tim Rankel

Tim Rankel

Senior Developer at MeMD

Transform your applications today by downloading our free evaluation version Download Free Trial

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile