-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nzselect): 为nz-select添加tabindex属性 #2574
Conversation
Deploy preview for ng-zorro-master ready! Built with commit 11581f2 |
Codecov Report
@@ Coverage Diff @@
## master #2574 +/- ##
=========================================
- Coverage 97.34% 95.5% -1.84%
=========================================
Files 552 495 -57
Lines 11587 12100 +513
Branches 827 1689 +862
=========================================
+ Hits 11279 11556 +277
+ Misses 195 172 -23
- Partials 113 372 +259
Continue to review full report at Codecov.
|
@@ -154,6 +154,7 @@ export class NzSelectComponent implements ControlValueAccessor, OnInit, AfterVie | |||
/** https://github.com/angular/angular/pull/13349/files **/ | |||
// tslint:disable-next-line:no-any | |||
@Input() compareWith = (o1: any, o2: any) => o1 === o2; | |||
@Input() tabindex = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value of tabindex
attribute in HTML Living Standard is 0 and I think we should align with that.
Also note that it is not recommended to use positive tabindex in most cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes,the default value shoud be 0,but sometimes it is necessary to skip it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tabindex should not be @Input
here, ref https://github.com/angular/material2/blob/master/src/lib/select/select.ts#L487
This PR will be closed due to no response for a long time, thanks for your contribution anyway. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
nz-select 添加tabindex属性绑定,用户在填写表单的时候可以指定nz-select的tabindex,这样用户在使用tab键切换表单的时候可以过滤一些不想要焦点的select
Does this PR introduce a breaking change?
Other information