Skip to content

Commit d4b37e3

Browse files
authored
ui: fix wrapping of dropdown items (#5242)
Long items within tb-dropdown are supposed to wrap onto multiple lines. Our CSS was incorrectly using a selector without enough specificity, and Angular was overriding our classname.
1 parent 9f3bf8b commit d4b37e3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tensorboard/webapp/widgets/dropdown/dropdown_component.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ mat-select:focus {
3232
max-width: 70vw;
3333
}
3434

35-
.tb-mat-option {
36-
// Overrides Angular Material's fixed height.
35+
// This selector needs relatively more specificity than Angular Material's
36+
// to override the fixed height.
37+
::ng-deep mat-option.mat-option {
3738
height: auto;
3839
}
3940

tensorboard/webapp/widgets/dropdown/dropdown_component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export interface DropdownOption {
3535
>
3636
<mat-option
3737
*ngFor="let option of options"
38-
class="tb-mat-option"
3938
[value]="option.value"
4039
[disabled]="option.disabled"
4140
>

0 commit comments

Comments
 (0)