diff --git a/README.md b/README.md index cba7a8fac..ee0a2884e 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ map: { | 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 | ### Outputs diff --git a/src/ng-select/lib/ng-select.component.ts b/src/ng-select/lib/ng-select.component.ts index 30b949ef8..ad2c12ea6 100644 --- a/src/ng-select/lib/ng-select.component.ts +++ b/src/ng-select/lib/ng-select.component.ts @@ -105,6 +105,7 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C @Input() clearOnBackspace = true; @Input() labelForId = null; @Input() inputAttrs: { [key: string]: string } = {}; + @Input() tabIndex: number; @Input() @HostBinding('class.ng-select-typeahead') typeahead: Subject; @Input() @HostBinding('class.ng-select-multiple') multiple = false; @@ -196,7 +197,6 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C constructor( @Attribute('class') public classes: string, - @Attribute('tabindex') public tabIndex: string, @Attribute('autofocus') private autoFocus: any, config: NgSelectConfig, @Inject(SELECTION_MODEL_FACTORY) newSelectionModel: SelectionModelFactory,