Skip to content

Commit

Permalink
feat(legacy): limit tui-tag width to 80% to avoid wrapping in sel…
Browse files Browse the repository at this point in the history
…ects
  • Loading branch information
splincode committed Dec 9, 2024
1 parent 026d13c commit 0882e86
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {TuiDataListWrapper} from '@taiga-ui/kit';
import {TuiMultiSelectModule, TuiTextfieldControllerModule} from '@taiga-ui/legacy';

const ITEMS: readonly string[] = [
'Luke Skywalker',
'Luke Skywalker and a long time ago in a galaxy far, far away..',
'Leia Organa Solo',
'Darth Vader',
'Han Solo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class Example {
protected itemGroupControl = new FormControl<Item[]>([]);

protected items = [
'Luke Skywalker',
'Luke Skywalker and a long time ago in a galaxy far, far away..',
'Leia Organa Solo',
'Darth Vader',
'Han Solo',
Expand All @@ -39,7 +39,7 @@ export default class Example {
];

protected customItems: readonly Item[] = [
{name: 'Luke Skywalker', id: 1},
{name: 'Luke Skywalker and a long time ago in a galaxy far, far away..', id: 1},
{name: 'Leia Organa Solo', id: 2},
{name: 'Darth Vader', id: 3},
{name: 'Han Solo', id: 4},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import type {PolymorpheusContent} from '@taiga-ui/polymorpheus';
})
export default class Example {
protected readonly items = [
'Luke Skywalker',
'Luke Skywalker and a long time ago in a galaxy far, far away..',
'Leia Organa Solo',
'Darth Vader',
'Han Solo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {TuiMultiSelectModule, TuiTextfieldControllerModule} from '@taiga-ui/lega
})
export default class Example {
protected readonly jedi: readonly string[] = [
'Luke Skywalker',
'Luke Skywalker and a long time ago in a galaxy far, far away..',
'Princess Leia',
'Han Solo',
'Obi-Wan Kenobi',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class Example {
protected readonly testValue = new FormControl<string[]>([]);

protected readonly items: readonly string[] = [
'Luke Skywalker',
'Luke Skywalker and a long time ago in a galaxy far, far away..',
'Leia Organa Solo',
'Darth Vader',
'Han Solo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {TuiSelectModule, TuiTextfieldControllerModule} from '@taiga-ui/legacy';
})
export default class Example {
protected items = [
'Luke Skywalker',
'Luke Skywalker and a long time ago in a galaxy far, far away..',
'Leia Organa Solo',
'Darth Vader',
'Han Solo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class Example {
protected itemControl = new FormControl<Item | null>(null);

protected items = [
'Luke Skywalker',
'Luke Skywalker and a long time ago in a galaxy far, far away..',
'Leia Organa Solo',
'Darth Vader',
'Han Solo',
Expand All @@ -37,7 +37,7 @@ export default class Example {
];

protected customItems: readonly Item[] = [
{name: 'Luke Skywalker', id: 1},
{name: 'Luke Skywalker and a long time ago in a galaxy far, far away..', id: 1},
{name: 'Leia Organa Solo', id: 2},
{name: 'Darth Vader', id: 3},
{name: 'Han Solo', id: 4},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {TuiMultiSelectModule, TuiTextfieldControllerModule} from '@taiga-ui/lega
})
export default class Example {
protected readonly items = [
'Luke Skywalker',
'Luke Skywalker and a long time ago in a galaxy far, far away..',
'Leia Organa Solo',
'Darth Vader',
'Han Solo',
Expand Down
4 changes: 4 additions & 0 deletions projects/legacy/components/input-tag/input-tag.style.less
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
:host[data-size='l']:not(._label-outside) & {
padding: 0;
}

tui-tag:last-of-type {
max-inline-size: 80%;
}
}

.t-content {
Expand Down

0 comments on commit 0882e86

Please sign in to comment.