-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(select): keyboard support #1417
Conversation
Select could be opened with up and down arrows. Options became focusable. It's possible to select an option with enter and space keys.
This way option text is styled as option text not as input label.
…to feat/select-keyboard-support
Codecov Report
@@ Coverage Diff @@
## next #1417 +/- ##
==========================================
- Coverage 82.62% 82.57% -0.06%
==========================================
Files 238 240 +2
Lines 7293 7328 +35
Branches 651 654 +3
==========================================
+ Hits 6026 6051 +25
- Misses 1079 1088 +9
- Partials 188 189 +1
|
@@ -672,7 +670,19 @@ export class NbSelectComponent<T> implements OnInit, AfterViewInit, AfterContent | |||
|
|||
show() { | |||
if (this.isHidden) { | |||
if (!this.ref) { |
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.
Let's not put if in if. Please, move in the separate function.
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.
Fixed c8822b2
this.ref.attach(this.portal); | ||
if (this.selectionModel.length) { |
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.
Let's not put if in if. Please, move in the separate function.
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.
Fixed c8822b2
Please read and mark the following check list before creating a pull request:
Short description of what this resolves: