From 112f6a2e386134c07e1b1fdaac97e5bdab61998d Mon Sep 17 00:00:00 2001 From: varnastadeus Date: Sun, 7 Jul 2019 18:24:22 +0300 Subject: [PATCH] feat: add input for tabIndex closes #1175 --- README.md | 1 + src/ng-select/lib/ng-select.component.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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,