From 69a20957f0e178b9656f7a198a2f477eb026d83e Mon Sep 17 00:00:00 2001 From: splincode Date: Tue, 10 Dec 2024 19:57:30 +0300 Subject: [PATCH] feat(addon-table): allow resize more than 100% width of table --- .../components/table/th/th.component.ts | 3 +- .../components/table/examples/8/index.html | 61 +++++++++++++++++++ .../components/table/examples/8/index.ts | 13 ++++ .../src/modules/components/table/index.ts | 1 + 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 projects/demo/src/modules/components/table/examples/8/index.html create mode 100644 projects/demo/src/modules/components/table/examples/8/index.ts diff --git a/projects/addon-table/components/table/th/th.component.ts b/projects/addon-table/components/table/th/th.component.ts index 3b6046f035142..d5293c66f5894 100644 --- a/projects/addon-table/components/table/th/th.component.ts +++ b/projects/addon-table/components/table/th/th.component.ts @@ -24,7 +24,8 @@ import {TUI_TABLE_OPTIONS, TuiSortDirection} from '../table.options'; styleUrls: ['./th.style.less'], changeDetection: ChangeDetectionStrategy.OnPush, host: { - '[style.width.px]': 'width', + '[style.min-width.px]': 'width', + '[style.max-width.px]': 'width', '[class._sticky]': 'sticky', }, }) diff --git a/projects/demo/src/modules/components/table/examples/8/index.html b/projects/demo/src/modules/components/table/examples/8/index.html new file mode 100644 index 0000000000000..01fb3360f01c5 --- /dev/null +++ b/projects/demo/src/modules/components/table/examples/8/index.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + +
+ a + + b + + c +
+ a + + b + + content content + ntcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcon + tentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontent + contentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentconten + tcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentconten + tcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentco + ntentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontent +
diff --git a/projects/demo/src/modules/components/table/examples/8/index.ts b/projects/demo/src/modules/components/table/examples/8/index.ts new file mode 100644 index 0000000000000..302184873bd0a --- /dev/null +++ b/projects/demo/src/modules/components/table/examples/8/index.ts @@ -0,0 +1,13 @@ +import {Component} from '@angular/core'; +import {changeDetection} from '@demo/emulate/change-detection'; +import {encapsulation} from '@demo/emulate/encapsulation'; +import {TuiTable} from '@taiga-ui/addon-table'; + +@Component({ + standalone: true, + imports: [TuiTable], + templateUrl: './index.html', + encapsulation, + changeDetection, +}) +export default class Example {} diff --git a/projects/demo/src/modules/components/table/index.ts b/projects/demo/src/modules/components/table/index.ts index dbe2ba8dd43a2..91b92eb54e42e 100644 --- a/projects/demo/src/modules/components/table/index.ts +++ b/projects/demo/src/modules/components/table/index.ts @@ -19,5 +19,6 @@ export default class Page { 'Virtual scroll', 'Dynamic columns', 'Footer', + 'Allow resize more than 100%', ]; }