Skip to content

Commit

Permalink
feat: add input for tabIndex
Browse files Browse the repository at this point in the history
closes #1175
  • Loading branch information
varnastadeus committed Jul 7, 2019
1 parent 1614aa7 commit 112f6a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/ng-select/lib/ng-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>;
@Input() @HostBinding('class.ng-select-multiple') multiple = false;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 112f6a2

Please sign in to comment.