-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(legacy):
MultiSelect
fix for long items overflowing (#9160)
Co-authored-by: taiga-family-bot <[email protected]>
- Loading branch information
1 parent
8e513a2
commit 80fdfd0
Showing
9 changed files
with
102 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
projects/demo/src/modules/components/multi-select/examples/13/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<tui-multi-select [(ngModel)]="value"> | ||
Multiple lines | ||
<tui-data-list-wrapper | ||
*tuiDataList | ||
tuiMultiSelectGroup | ||
[items]="items" | ||
/> | ||
</tui-multi-select> | ||
<p> | ||
<tui-multi-select [(ngModel)]="value"> | ||
Scrollable with fade | ||
<tui-data-list-wrapper | ||
*tuiDataList | ||
tuiMultiSelectGroup | ||
[itemContent]="fade" | ||
[items]="items" | ||
/> | ||
<ng-template | ||
#fade | ||
let-item | ||
> | ||
<div | ||
tuiFade | ||
class="fade" | ||
> | ||
{{ item }} | ||
</div> | ||
</ng-template> | ||
</tui-multi-select> | ||
</p> | ||
<tui-multi-select [(ngModel)]="value"> | ||
Ellipsis | ||
<tui-data-list-wrapper | ||
*tuiDataList | ||
tuiMultiSelectGroup | ||
[itemContent]="ellipsis" | ||
[items]="items" | ||
/> | ||
<ng-template | ||
#ellipsis | ||
let-item | ||
> | ||
<div class="ellipsis">{{ item }}</div> | ||
</ng-template> | ||
</tui-multi-select> |
9 changes: 9 additions & 0 deletions
9
projects/demo/src/modules/components/multi-select/examples/13/index.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@import '@taiga-ui/core/styles/taiga-ui-local'; | ||
|
||
.fade { | ||
white-space: nowrap; | ||
} | ||
|
||
.ellipsis { | ||
.text-overflow(); | ||
} |
22 changes: 22 additions & 0 deletions
22
projects/demo/src/modules/components/multi-select/examples/13/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Component} from '@angular/core'; | ||
import {FormsModule} from '@angular/forms'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiDataListWrapper, TuiFade} from '@taiga-ui/kit'; | ||
import {TuiMultiSelectModule} from '@taiga-ui/legacy'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [FormsModule, TuiDataListWrapper, TuiFade, TuiMultiSelectModule], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export default class Example { | ||
protected readonly items: readonly string[] = [ | ||
'I am a very very long item that definitely overflows', | ||
]; | ||
|
||
protected value: readonly string[] = []; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
.t-content { | ||
flex: 1; | ||
min-inline-size: 0; | ||
} | ||
|
||
.t-loader { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
flex: 1; | ||
align-items: center; | ||
animation: retrigger 1s; | ||
overflow: hidden; | ||
} | ||
|
||
.t-checkbox { | ||
|