包详细信息

@ng-select/ng-select

ng-select1.8mMIT14.7.0

Angular ng-select - All in One UI Select, Multiselect and Autocomplete

angular, select, ui-select, dropdown

自述文件

npm version Coverage Status gzip bundle size ng-select channel on discord

Angular ng-select - Lightweight all in one UI Select, Multiselect and Autocomplete

See Demo page.


Versions

Angular ng-select
>=19.0.0 <20.0.0 v14.x
>=18.0.0 <19.0.0 v13.x
>=17.0.0 <18.0.0 v12.x
>=16.0.0 <17.0.0 v11.x
>=15.0.0 <16.0.0 v10.x
>=14.0.0 <15.0.0 v9.x
>=13.0.0 <14.0.0 v8.x
>=12.0.0 <13.0.0 v7.x
>=11.0.0 <12.0.0 v6.x
>=10.0.0 <11.0.0 v5.x
>=9.0.0 <10.0.0 v4.x
>=8.0.0 <9.0.0 v3.x
>=6.0.0 <8.0.0 v2.x
v5.x.x v1.x

Browser Support

ng-select supports all browsers supported by Angular. For current list, see https://angular.io/guide/browser-support#browser-support. This includes the following specific versions:

Chrome    2 most recent versions
Firefox    latest and extended support release (ESR)
Edge    2 most recent major versions
Safari    2 most recent major versions
iOS    2 most recent major versions
Android    2 most recent major versions

Table of contents

Features

  • [x] Custom binding to property or object
  • [x] Custom option, label, header and footer templates
  • [x] Virtual Scroll support with large data sets (>5000 items).
  • [x] Infinite scroll
  • [x] Keyboard navigation
  • [x] Multiselect
  • [x] Flexible autocomplete with client/server filtering
  • [x] Custom search
  • [x] Custom tags
  • [x] Append to
  • [x] Group items
  • [x] Output events
  • [x] Accessibility
  • [x] Good base functionality test coverage
  • [x] Themes

Warning

Library is under active development and may have API breaking changes for subsequent major versions after 1.0.0.

Getting started

Step 1: Install ng-select:

NPM

npm install --save @ng-select/ng-select

YARN

yarn add @ng-select/ng-select

Step 2:

Standalone: Import NgSelectComponent and other necessary directives directly:

import { NgLabelTemplateDirective, NgOptionTemplateDirective, NgSelectComponent } from '@ng-select/ng-select';
import { FormsModule } from '@angular/forms';

@Component({
  selector: 'example',
  standalone: true,
  template: './example.component.html',
  styleUrl: './example.component.scss',
  imports: [
    NgLabelTemplateDirective,
    NgOptionTemplateDirective,
    NgSelectComponent,
  ],
})
export class ExampleComponent {}

NgModule: Import the NgSelectModule and angular FormsModule module:

import { NgSelectModule } from '@ng-select/ng-select';
import { FormsModule } from '@angular/forms';

@NgModule({
  declarations: [AppComponent],
  imports: [NgSelectModule, FormsModule],
  bootstrap: [AppComponent]
})
export class AppModule {}

Step 3: Include a theme:

To allow customization and theming, ng-select bundle includes only generic styles that are necessary for correct layout and positioning. To get full look of the control, include one of the themes in your application. If you're using the Angular CLI, you can add this to your styles.scss or include it in .angular-cli.json (Angular v5 and below) or angular.json (Angular v6 onwards).

@import "~@ng-select/ng-select/themes/default.theme.css";
// ... or
@import "~@ng-select/ng-select/themes/material.theme.css";

Step 4 (Optional): Configuration

You can also set global configuration and localization messages by injecting NgSelectConfig service, typically in your root component, and customize the values of its properties in order to provide default values.

  constructor(private config: NgSelectConfig) {
      this.config.notFoundText = 'Custom not found';
      this.config.appendTo = 'body';
      // set the bindValue to global config when you use the same
      // bindValue in most of the place.
      // You can also override bindValue for the specified template
      // by defining `bindValue` as property
      // Eg : <ng-select bindValue="some-new-value"></ng-select>
      this.config.bindValue = 'value';
  }

Usage

Define options in your consuming component:

@Component({...})
export class ExampleComponent {

    selectedCar: number;

    cars = [
        { id: 1, name: 'Volvo' },
        { id: 2, name: 'Saab' },
        { id: 3, name: 'Opel' },
        { id: 4, name: 'Audi' },
    ];
}

In template use ng-select component with your options

<!--Using ng-option and for loop-->
<ng-select [(ngModel)]="selectedCar">
    @for (car of cars; track car.id) {
        <ng-option [value]="car.id">{{car.name}}</ng-option>
    }
</ng-select>

<!--Using items input-->
<ng-select [items]="cars"
           bindLabel="name"
           bindValue="id"
           [(ngModel)]="selectedCar">
</ng-select>

For more detailed examples see Demo page

SystemJS

If you are using SystemJS, you should also adjust your configuration to point to the UMD bundle.

In your systemjs config file, map needs to tell the System loader where to look for ng-select:

map: {
  '@ng-select/ng-select': 'node_modules/@ng-select/ng-select/bundles/ng-select.umd.js',
}

API

Inputs

Input Type Default Required Description
[addTag] `boolean \ ((term: string) => any \ Promise<any>)` false no Allows to create custom options.
addTagText string Add item no Set custom text when using tagging
appearance string underline no Allows to select dropdown appearance. Set to outline to add border instead of underline (applies only to Material theme)
appendTo string null no Append dropdown to body or any other element using css selector. For correct positioning body should have position:relative
bufferAmount number 4 no Used in virtual scrolling, the bufferAmount property controls the number of items preloaded in the background to ensure smoother and more seamless scrolling.
bindValue string - no Object property to use for selected model. By default binds to whole object.
bindLabel string label no Object property to use for label. Default label
[closeOnSelect] boolean true no Whether to close the menu when a value is selected
clearAllText string Clear all no Set custom text for clear all icon title
[clearable] boolean true no Allow to clear selected value. Default true
[clearOnBackspace] boolean true no Clear selected values one by one when clicking backspace. Default true
[compareWith] (a: any, b: any) => boolean (a, b) => a === b no A function to compare the option values with the selected values. The first argument is a value from an option. The second is a value from the selection(model). A boolean should be returned.
dropdownPosition bottom \ top \ auto auto no Set the dropdown position on open
[fixedPlaceholder] boolean false no Set placeholder visible even when an item is selected
[groupBy] string \ Function null no Allow to group items by key or function expression
[groupValue] (groupKey: string, children: any[]) => Object - no Function expression to provide group value
[selectableGroup] boolean false no Allow to select group when groupBy is used
[selectableGroupAsModel] boolean true no Indicates whether to select all children or group itself
[items] Array<any> [] yes Items array
[loading] boolean - no You can set the loading state from the outside (e.g. async items loading)
loadingText string Loading... no Set custom text when for loading items
labelForId string - no Id to associate control with label.
[markFirst] boolean true no Marks first item as focused when opening/filtering.
[isOpen] boolean - no Allows manual control of dropdown opening and closing. true - won't close. false - won't open.
maxSelectedItems number none no When multiple = true, allows to set a limit number of selection.
[hideSelected] boolean false no Allows to hide selected items.
[multiple] boolean false no Allows to select multiple items.
notFoundText string No items found no Set custom text when filter returns empty result
placeholder string - no Placeholder text.
[searchable] boolean true no Allow to search for value. Default true
[readonly] boolean false no Set ng-select as readonly. Mostly used with reactive forms.
[searchFn] (term: string, item: any) => boolean null no Allow to filter by custom search function
[searchWhileComposing] boolean true no Whether items should be filtered while composition started
[trackByFn] (item: any) => any null no Provide custom trackBy function
[clearSearchOnAdd] boolean true no Clears search input when item is selected. Default true. Default false when closeOnSelect is false
[deselectOnClick] boolean false no Deselects a selected item when it is clicked in the dropdown. Default false. Default true when multiple is true
[editableSearchTerm] boolean false no Allow to edit search query if option selected. Default false. Works only if multiple is false.
[selectOnTab] boolean false no Select marked dropdown item using tab. Default false
[tabFocusOnClearButton] boolean true no Control tab navigation behavior for the clear button. Default true
[openOnEnter] boolean true no Open dropdown using enter. Default true
[typeahead] Subject - no Custom autocomplete or advanced filter.
[minTermLength] number 0 no Minimum term length to start a search. Should be used with typeahead
typeToSearchText string Type to search no Set custom text when using Typeahead
[virtualScroll] boolean false no Enable virtual scroll for better performance when rendering a lot of data
[inputAttrs] { [key: string]: string } - no Pass custom attributes to underlying input element
[tabIndex] number - no Set tabindex on ng-select
[preventToggleOnRightClick] boolean false no Prevent opening of ng-select on right mouse click
[keyDownFn] ($event: KeyboardEvent) => bool true no Provide custom keyDown function. Executed before default handler. Return false to suppress execution of default key down handlers

Outputs

Output Description
(add) Fired when item is added while [multiple]="true". Outputs added item
(blur) Fired on select blur
(change) Fired on model change. Outputs whole model
(close) Fired on select dropdown close
(clear) Fired on clear icon click
(focus) Fired on select focus
(search) Fired while typing search term. Outputs search term with filtered items
(open) Fired on select dropdown open
(remove) Fired when item is removed while [multiple]="true"
(scroll) Fired when scrolled. Provides the start and end index of the currently available items. Can be used for loading more items in chunks before the user has scrolled all the way to the bottom of the list.
(scrollToEnd) Fired when scrolled to the end of items. Can be used for loading more items in chunks.

Methods

Name | Description | | ------------- | ------------- | | open | Opens the select dropdown panel | | close | Closes the select dropdown panel | | focus | Focuses the select element | | blur | Blurs the select element |

Other

Name | Type | Description | | ------------- | ------------- | ------------- | | [ngOptionHighlight] | directive | Highlights search term in option. Accepts search term. Should be used on option element. README | | NgSelectConfig | configuration | Configuration provider for the NgSelect component. You can inject this service and provide application wide configuration. | | SELECTION_MODEL_FACTORY | service | DI token for SelectionModel implementation. You can provide custom implementation changing selection behaviour. |

Custom selection logic

Ng-select allows to provide custom selection implementation using SELECTION_MODEL_FACTORY. To override default logic provide your factory method in your angular module.

// app.module.ts.ts
providers: [
    { provide: SELECTION_MODEL_FACTORY, useValue: <SelectionModelFactory>CustomSelectionFactory }
]

// selection-model.ts
export function CustomSelectionFactory() {
    return new CustomSelectionModel();
}

export class CustomSelectionModel implements SelectionModel {
    ...
}

Change Detection

Ng-select component implements OnPush change detection which means the dirty checking checks for immutable data types. That means if you do object mutations like:

this.items.push({id: 1, name: 'New item'})

Component will not detect a change. Instead you need to do:

this.items = [...this.items, {id: 1, name: 'New item'}];

This will cause the component to detect the change and update. Some might have concerns that this is a pricey operation, however, it is much more performant than running ngDoCheck and constantly diffing the array.

Custom styles

If you are not happy with default styles you can easily override them with increased selector specificity or creating your own theme. This applies if you are using no ViewEncapsulation or adding styles to global stylesheet. E.g.

<ng-select class="custom"></ng-select>
.ng-select.custom {
    border:0px;
    min-height: 0px;
    border-radius: 0;
}
.ng-select.custom .ng-select-container  {
    min-height: 0px;
    border-radius: 0;
}

If you are using ViewEncapsulation, you could use special ::ng-deep selector which will prevent scoping for nested selectors altough this is more of a workaround and we recommend using solution described above.

.ng-select.custom ::ng-deep .ng-select-container  {
    min-height: 0px;
    border-radius: 0;
}

WARNING: Keep in mind that ng-deep is deprecated and there is no alternative to it yet. See Here.

Validation state

By default when you use reactive forms validators or template driven forms validators css class ng-invalid will be applied on ng-select. You can show errors state by adding custom css style

ng-select.ng-invalid.ng-touched .ng-select-container {
    border-color: #dc3545;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px #fde6e8;
}

Contributing

Contributions are welcome. You can start by looking at issues with label Help wanted or creating new Issue with proposal or bug report. Note that we are using https://conventionalcommits.org/ commits format.

Development

Perform the clone-to-launch steps with these terminal commands.

Run demo page in watch mode

git clone https://github.com/ng-select/ng-select
cd ng-select
yarn
yarn run start

Testing

yarn run test
or
yarn run test:watch

Release

To release to npm just run ./release.sh, of course if you have permissions ;)

Inspiration

This component is inspired by React select and Virtual scroll. Check theirs amazing work and components :)

更新日志

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

Since 3.2.0, notable changes are on Releases Page

3.1.1 (2019-10-19)

Features

  • keyDownFn: user defined keydown handler to prevent ng-select behaviour(8b2b817), closes #1155

Bug Fixes

3.1.0 (2019-10-14)

Bug Fixes

  • add licence for ng-option-highlight (cef723f)
  • make all templates dynamic (6801f7f), closes #1255

Features

3.0.7 (2019-08-25)

Bug Fixes

  • run close event inside zone (b5f63b6), closes #1309
  • scroll to marked item only when it is outside of panel height (eb1a803), closes #1273

3.0.6 (2019-08-05)

Bug Fixes

  • emit typeahead value when search is cleared after item is added (#1289) (550a75a), closes #1107

3.0.5 (2019-07-30)

Bug Fixes

3.0.4 (2019-07-26)

Bug Fixes

  • dynamic footer and header template (#1268) (8787fa9), closes #1282
  • use regex with multiple return to highlight multiple search terms (#1275) (8a0d880), closes #739

3.0.3 (2019-07-15)

Bug Fixes

3.0.2 (2019-07-11)

Bug Fixes

  • ng-option: don't escape html inside ng-options (7ccea9d), closes #506
  • ng-option: handle label updates (634c804), closes #649

3.0.1 (2019-07-09)

Bug Fixes

  • update peer dependencies to start from v8 (a90e3f1)

3.0.0 (2019-07-08)

Bug Fixes

  • emit add event after model has been updated (86d611d), closes #620
  • preserve items without group order (86ab751), closes #1132
  • stringify group label (d8be200), closes #1052
  • use border thin for material theme (1083ff6), closes #969

Chores

  • move [ngOptionHighlight] to a separate package (c09dde8), closes #1116
  • remove [excludeGroupsFromDefaultSelection] (4fef383)

Features

BREAKING CHANGES

  • autoCorrect, autoCapitalize are now removed.
  • [ngOptionHighlight] is now available from @ng-select/ng-option-highlight
  • [excludeGroupsFromDefaultSelection] is now removed until better solution is found
  • filterValue is now available as searchTerm

2.20.5 (2019-07-04)

Bug Fixes

  • mark first item when last marked is filtered out (e08a769), closes #1247

2.20.4 (2019-07-04)

Bug Fixes

2.20.3 (2019-07-02)

Bug Fixes

  • adjust dropdown position on selection change - include top (69490ae), closes #1234

2.20.2 (2019-06-27)

Bug Fixes

  • don't calculate panel dimensions for empty array (9d8ccf3), closes #1237
  • ignore tab when dropdown is closed and addTag is false (7f31ea6), closes #1212

2.20.1 (2019-06-25)

Bug Fixes

Features

  • feat: adjust dropdown position on selection when multiple and appendTo (c2b094e), closes #984

2.20.0 (2019-05-18)

Bug Fixes

  • add tag on tab when isOpen = false (ab8b661), closes #1159
  • disable input when max items is selected (240f4b5), closes #1168
  • remove unnecessary stopPropagation calls (e994937), closes #1169
  • take into account bindLabel when adding tag (36bc0d2), closes #1141
  • take into account bindValue if groupValue is used (941217f), closes #1161

Features

  • trackByFn: allow to provide custom trackBy function (0afa9c1), closes #1134

2.19.0 (2019-05-04)

Features

  • add getter for current dropdown position (0cc4203)

2.18.0 (2019-04-20)

Features

  • proper ant design theme (b6c8535)

2.17.0 (2019-04-11)

Features

2.16.4 (2019-04-01)

Bug Fixes

  • hideSelected: allow in single selection (ee9ee0d), closes #1059

2.16.3 (2019-03-28)

2.16.2 (2019-03-08)

Bug Fixes

  • add timeout for dropdown panel to fully render (d38f897), closes #1042

2.16.1 (2019-03-08)

Bug Fixes

  • do not append dropdown when it is destroyed (#1091) (d9e23c6)

2.16.0 (2019-02-28)

Bug Fixes

Features

  • expose filtered items through search event (3d14002), closes #973

2.15.3 (2019-02-05)

Bug Fixes

  • remove disabled items while setting new model (9036672), closes #1043

2.15.2 (2019-02-01)

Bug Fixes

  • single: allow to unselect last selected value even if disabled (25e8e4f), closes #1036
  • add class to dropdown panel only when appendTo is used (797ac9e), closes #1035
  • themes: use more variables (45af289), closes #388

2.15.1 (2019-01-25)

Bug Fixes

  • set items from ngOptions only when [items] unused (f4e4c6b)

2.15.0 (2019-01-24)

Bug Fixes

  • ng-option: don't filter out empty array (90feb5f), closes #1019
  • don't allow to unselect disabled items (26744d0), closes #971

Features

2.14.0 (2019-01-09)

Features

2.13.3 (2018-12-20)

Bug Fixes

  • keep selected items while bindValue is incorrect (b7294a3), closes #993

2.13.2 (2018-12-18)

Bug Fixes

2.13.1 (2018-12-05)

Bug Fixes

2.13.0 (2018-12-03)

Features

  • templates: add searchTerm to header and footer (ng-select#961) (40eb264)

2.12.1 (2018-11-14)

Bug Fixes

  • handler mousedown for clear event when used animation library (#931) (dfbbcd6), closes #928
  • use classList instead of className (bc6f084), closes #940

2.12.0 (2018-11-06)

Bug Fixes

  • keep items order while mapping selected options (bc1ef8e), closes #907

Features

  • allow to customise clear icon (3e8ad77), closes #835
  • autofocus: focus if attribute is present (#924) (b78f39f), closes #762
  • clearOnBackspace: configure whether backspace removes selection (af79a45), closes #861
  • isOpen: treat undefined value as default behaviour (127d6be), closes #816

2.11.2 (2018-10-25)

Bug Fixes

  • use autocomplete off when labelForId is used (5f4d833), closes #269

2.11.1 (2018-10-20)

Bug Fixes

  • repository links and silence angular 7 install warning (9746073)

2.11.0 (2018-10-19)

Bug Fixes

  • NgSelectConfig: use class as config provider (8bea572), closes #863

Features

  • openOnEnter: allow to configure whether enter opens dropdown (fe9d990), closes #878

2.10.5 (2018-10-17)

Bug Fixes

  • don't validate selected model when compareWith is used (e30e365)

2.10.4 (2018-10-16)

2.10.3 (2018-10-15)

Bug Fixes

  • resolve dropdown panel text align in rtl mode (#868) (52cd669)

2.10.2 (2018-10-09)

Bug Fixes

  • fixed null value display when using angular universal (#852) (77482c0), closes #764

2.10.1 (2018-10-03)

2.10.0 (2018-10-03)

Features

2.9.1 (2018-09-20)

Bug Fixes

  • tags: add tag as string when there are no items defined (7dd4094), closes #809
  • tags: allow to add previously added tag when select is closed (daac234), closes #783

2.9.0 (2018-09-13)

Features

  • groupValue: allow to specify custom grouped value (b458231)

2.8.1 (2018-09-11)

Bug Fixes

  • correctly map selected items from items array (c8216e8), closes #781
  • don't clear search term when closeOnSelect is false (4fc243a), closes #794

2.8.0 (2018-09-07)

Features

2.7.1 (2018-09-05)

Bug Fixes

  • use factory to resolve new instance of selection model (#789) (f1a4f23), closes #787

  • don't set group as selected when all it's children selected (5f63d13)

Features

  • introduce customisable selection model (#785) (a1ce17f)

2.6.0 (2018-08-30)

Bug Fixes

  • set group as selected when all children selected (8afda25)

Features

  • allow to toggle whether selectable group acts as model (7962dc5), closes #734

2.5.1 (2018-08-27)

Bug Fixes

  • stop mouse down propagation at the beginning (b85dedd)

2.5.0 (2018-08-17)

Features

2.4.3 (2018-08-15)

Bug Fixes

  • set input width to 0 when not searchable (056f34f), closes #651

2.4.2 (2018-08-12)

Bug Fixes

  • listen to touchstart events for outside click. (70fcd66)
  • remove circular dependency between dropdown and select cmp (#741) (7520e85), closes #668

2.4.1 (2018-08-09)

Bug Fixes

  • allow to reposition input cursor using mouse (25de23f), closes #644

2.4.0 (2018-08-08)

Bug Fixes

  • tagging: don't show tag if it exists among items or selected (d5e97af), closes #693
  • accept spaces while tagging without dropdown (4320098), closes #676

Features

2.3.6 (2018-07-30)

Bug Fixes

  • focus select after unselecting single item (1bc3f02), closes #661

2.3.5 (2018-07-18)

Bug Fixes

2.3.4 (2018-07-18)

Bug Fixes

  • don't fail while resolving selected item using ng-option (6c676c8), closes #677
  • emit focus and blur events (3edb0df), closes #690

2.3.3 (2018-07-10)

Bug Fixes

  • don't fire addEvent for single select (cbfd948)
  • don't fire change event for same selection (8ed435c), closes #664

2.3.2 (2018-06-27)

Bug Fixes

2.3.1 (2018-06-22)

Bug Fixes

  • don't ignore bindLabel when label prop exists (85c780f), closes #614

2.3.0 (2018-06-21)

Bug Fixes

Features

2.2.0 (2018-06-18)

Bug Fixes

Features

  • isOpen: allow to control whether dropdown should open or close (ab6c388)

2.1.3 (2018-06-01)

Bug Fixes

  • groupBy: treat empty string as valid group (acef714)

2.1.2 (2018-05-30)

Bug Fixes

  • allow to use compareWith fn when bindValue is used (#586) (7a3dfb3), closes #535

2.1.1 (2018-05-29)

Bug Fixes

  • keep filter status consistent with items updates (#585) (5eecd83)

2.1.0 (2018-05-24)

Bug Fixes

  • styles: make group more distinctable (5808eb7)
  • typeahead: don't insert option back to list for newly created tag (4c20e9e), closes #513
  • don't group items without key (0bf6483)

Features

  • add placeholder as global config (ad8a644)

2.0.3 (2018-05-18)

Bug Fixes

2.0.2 (2018-05-17)

Bug Fixes

  • theme: add padding for multiselect (6a9f680)

2.0.1 (2018-05-16)

Features

2.0.0 (2018-05-11)

Features

BREAKING CHANGES

  • this changes utilizes new RXJs 6 which is not with previous version. Due to that angular version was also increased.

1.4.2 (2018-05-10)

Bug Fixes

  • material: set min height for ng-option (eb6f9bd), closes #520
  • style: add padding to individual disabled elements (6e5cf50), closes #406

1.4.1 (2018-05-05)

Bug Fixes

  • keep input focues while clicking dropdown items (fe3853d), closes #514
  • reset marked item when items updated (5f05b30), closes #510

1.4.0 (2018-05-01)

Bug Fixes

  • keep dropdown closed while unselecting value (bcf3340), closes #496

Features

1.3.0 (2018-04-26)

Bug Fixes

Features

  • support item navigation while not searchable (#499) (38c27dc), closes #117

1.2.1 (2018-04-25)

Bug Fixes

  • remove initial dropdown append logic from updateDropdownPosition (ea06c64)

1.2.0 (2018-04-25)

Features

  • clear on add functionality, expose updateDropdownPosition (#497) (47f02c8), closes #276

1.1.4 (2018-04-24)

Bug Fixes

  • add min-width to dropdown panel (ef247a8)

1.1.3 (2018-04-24)

Bug Fixes

  • use width for dropdown panel (c07351c)

1.1.1 (2018-04-22)

Bug Fixes

  • use bindlabel for group key when using fn expression (1006a93), closes #488
  • use min-width for dropdown panel (727c637), closes #476
  • use random id for autocomplete attribute (e097c4a), closes #269

1.1.0 (2018-04-19)

Features

1.0.6 (2018-04-19)

Bug Fixes

1.0.5 (2018-04-18)

Bug Fixes

  • prevent default dropdown click event (#474) (d28bd4c)

1.0.4 (2018-04-18)

Bug Fixes

  • increase css specifity (0d1d13c), closes #468
  • use blur event to close dropdown (1f85adc)
  • use special value mapping for ng-options (61d61a2)

1.0.3 (2018-04-17)

Bug Fixes

1.0.2 (2018-04-16)

1.0.1 (2018-04-16)

Bug Fixes

1.0.1-rc.0 (2018-04-16)

Bug Fixes

  • add ng-option-marked class for custom tags (a158d7b)
  • remove input if searchable is false (#442) (2149517)
  • rename focusSearchInput to focus (#447) (cb71544)

0.36.2 (2018-04-11)

Bug Fixes

  • use interpolation instead of innerHTML (79d555a)

0.36.1 (2018-04-11)

Bug Fixes

  • disable term highlighting by default (2b84190)
  • sanitize options (1fbfd24)

0.36.0 (2018-04-10)

Features

  • adding basic support for Narrators on Dropdown (#433) (30201c0), closes #216

0.35.2 (2018-04-09)

0.35.1 (2018-04-06)

Bug Fixes

0.35.0 (2018-04-04)

Features

0.34.3 (2018-03-31)

Bug Fixes

0.34.2 (2018-03-30)

0.34.1 (2018-03-30)

Bug Fixes

  • remove default compareWith (ec56c64)

0.34.0 (2018-03-30)

Features

0.33.0 (2018-03-30)

Features

0.32.0 (2018-03-29)

Features

0.31.1 (2018-03-27)

Bug Fixes

0.31.0 (2018-03-27)

Features

0.30.1 (2018-03-19)

Bug Fixes

0.30.0 (2018-03-15)

Bug Fixes

Features

0.29.1 (2018-03-15)

Bug Fixes

  • don't reset items while selecting (68b3726)
  • skip writeValue handling if value is empty (#351) (9d5811e), closes #348

0.29.0 (2018-03-14)

Features

0.28.1 (2018-03-13)

Bug Fixes

  • always clear selected value on writeValue (#349) (8edea5a)

0.28.0 (2018-03-13)

Bug Fixes

  • clear previous model then setting new programatically (#346) (3311f8c), closes #343
  • demo custom templates (32c4b25)

Features

  • template: loading, not found, type to search state template options. (#341) (acdf5c2), closes #217 #201

0.27.1 (2018-03-12)

Bug Fixes

  • remove uneeded api field (68b12f5)

0.27.0 (2018-03-12)

Bug Fixes

  • wrong method for api unselect (531fd1b)

Features

0.26.2 (2018-03-09)

Bug Fixes

0.26.1 (2018-03-08)

Bug Fixes

0.26.0 (2018-03-07)

Bug Fixes

Features

0.25.0 (2018-03-05)

Bug Fixes

Features

0.24.1 (2018-03-03)

Bug Fixes

  • scrollToEnd: fire when scroll equal to clientHeight. (#318) (c516440)

0.24.0 (2018-02-28)

Features

0.23.3 (2018-02-28)

Bug Fixes

0.23.2 (2018-02-28)

Bug Fixes

0.23.1 (2018-02-27)

Bug Fixes

0.23.0 (2018-02-26)

Features

0.22.0 (2018-02-25)

Bug Fixes

  • mark first item when selected is not among options (#281) (8a23b71), closes #278

Features

0.21.0 (2018-02-19)

Features

  • tags: support promise while creating new tag (#273) (d0295fa), closes #220
  • template: expose label in ng-label-tmp (f3cfc7a), closes #274

0.20.4 (2018-02-16)

Bug Fixes

0.20.3 (2018-02-15)

Bug Fixes

0.20.2 (2018-02-10)

Features

Bug Fixes

  • multiselect: allow to clear item even no items available (#251) (fb7b94b), closes #247
  • don't show not found text while loading (#252) (6be231a), closes #243

0.20.1 (2018-02-08)

Bug Fixes

0.20.0 (2018-02-08)

Features

  • allow to set max selected items using multiple (#239) (f500654), closes #181

0.19.0 (2018-02-07)

Features

0.18.0 (2018-02-06)

Features

  • highlight search term in labels in dropdown list (#233) (493c349), closes #152

0.17.2 (2018-02-05)

Bug Fixes

0.17.1 (2018-02-04)

Bug Fixes

0.17.0 (2018-02-02)

Bug Fixes

Features

0.16.0 (2018-01-29)

Bug Fixes

Features

  • using a getter/setter for isLoading which enables exposing the same and having a change emitter (#206) (cd3dec1), closes #205

0.15.2 (2018-01-18)

Bug Fixes

  • make filter readonly if not searchable (#199) (47d1087)

0.15.1 (2018-01-17)

0.15.0 (2018-01-17)

Bug Fixes

Features

0.14.4 (2018-01-16)

Bug Fixes

  • make ng-input z-index bigger to focus on placeholder click (#190) (68d0772)

0.14.3 (2018-01-09)

Bug Fixes

  • check if bindLabel exist while searching for selected items (1835187)

0.14.2 (2018-01-06)

Bug Fixes

  • Styling flaw when using dropdownPosition top (#173) (28d4337)
  • templates: unselect item using value fixes #175 (6f245de)

0.14.1 (2017-12-20)

Bug Fixes

0.14.0 (2017-12-20)

Features

  • allow append dropdown to element like body (#170) (d50552f)

0.13.0 (2017-12-18)

Bug Fixes

  • separate extraneous properties with object values closes #165 (ff8981c)

Features

  • bindLabel: support nested expression closes #159 (b803744)

0.12.0 (2017-12-05)

Bug Fixes

Features

  • Allow to change dropdown positioning. (#154) (1e4d521)

0.11.0 (2017-11-29)

Features

0.10.0 (2017-11-27)

Features

0.9.0 (2017-11-26)

Bug Fixes

Features

  • toggle dropdown when searchable is false. (#137) (2477717)

0.8.0 (2017-11-20)

Bug Fixes

  • events: don't fire change event on search clear (#130) (8bc8b8e), closes #126

Features

0.7.0 (2017-11-16)

Features

0.6.2 (2017-11-10)

Bug Fixes

0.6.1 (2017-11-07)

Bug Fixes

  • bump angular peer version (7a611df)

0.6.0 (2017-11-03)

Features

0.5.0 (2017-10-31)

Bug Fixes

Features

  • ng-option support for simple dropdowns (#113) (6d841ef)

0.4.5 (2017-10-28)

Bug Fixes

0.4.4 (2017-10-28)

Bug Fixes

  • don't clear selection on backspace when clearable false fixes #82 (95505fe)
  • don't fire change event on blur (582184e), closes #102
  • don't fire change event when there is no selected value (10999cb), closes #91

0.4.3 (2017-10-27)

0.4.2 (2017-10-25)

Bug Fixes

0.4.1 (2017-10-22)

Bug Fixes

  • multiselect: add disabled class for selected option closes #87 (#95) (e79867e)

0.4.0 (2017-10-20)

Features

  • tagging: allow creating new options (4149375), closes #34

0.3.1 (2017-10-20)

Bug Fixes

  • add typeahead css class binding on host (#92) (51d7036)

0.3.0 (2017-10-18)

Features

0.2.5 (2017-10-04)

Bug Fixes

  • clear filter value on selected item (#72) (4ebc1cf), closes #66

0.2.4 (2017-10-04)

Bug Fixes

  • navigation: close dropdown without selection on tab fixes #65 #67 (5e0ca53)

0.2.3 (2017-10-04)

Bug Fixes

  • handle selected value when items are not loaded yet (#61) (5bcdda5)

0.2.2 (2017-10-03)

Bug Fixes

  • navigation: close dropdown on tab click fixes #58 (#63) (e2fa1ed)

0.2.1 (2017-10-01)

Bug Fixes

  • do not use document click HostListener (80b6aa2)
  • run virtual scroll calculations outside angular zone (43ef5b9)

0.2.0 (2017-09-30)

Bug Fixes

  • handle clear and arrow click correctly (95b6e99)
  • navigation: close dropdown on tab click fixes #46 (#53) (32ff7e3)

Features

  • allow to configure module settings globally (d6d6e8d)

0.1.3 (2017-09-30)

Bug Fixes

  • click issue using custom template closes #6 (571319c)
  • virtual scroll scrollTop value calculation (1b0ed3c)
  • mark item on hover fixes #45 (e95a60c)

0.1.2 (2017-09-28)

Bug Fixes

  • Check if change detector is not destroyed (5f30ce8)

0.1.1 (2017-09-27)

Bug Fixes

  • Clear all selected values before new model write action (c76d410)

0.1.0 (2017-09-25)

Bug Fixes

  • Do not fire duplicate events (ebf2927)
  • Fire close event only dropdown was opened (e4084ea)
  • Increase dropdown container height (1c30d71)

Features

  • Focus first item on open/keyup (72f4dd0)

0.0.5 (2017-09-14)

0.0.4 (2017-09-08)

0.0.3 (2017-08-25)

0.0.2 (2017-08-23)