Skip to content

Commit

Permalink
feat(addon-table): allow resize more than 100% width of table
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Dec 10, 2024
1 parent b94bec5 commit 69a2095
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/addon-table/components/table/th/th.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
})
Expand Down
61 changes: 61 additions & 0 deletions projects/demo/src/modules/components/table/examples/8/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<table
tuiTable
[columns]="['a', 'b', 'c']"
>
<thead>
<tr tuiThGroup>
<th
*tuiHead="'a'"
tuiTh
[resizable]="true"
>
a
</th>
<th
*tuiHead="'b'"
tuiTh
[resizable]="true"
>
b
</th>
<th
*tuiHead="'c'"
tuiTh
[resizable]="true"
>
c
</th>
</tr>
</thead>
<tbody
tuiTbody
[data]="[{a: 1, b: 2, c: 3}]"
>
<tr tuiTr>
<td
*tuiCell="'a'"
tuiTd
>
a
</td>
<td
*tuiCell="'b'"
tuiTd
>
b
</td>
<td
*tuiCell="'c'"
tuiTd
>
content content
ntcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcon
tentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontent
contentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentconten
tcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentconten
tcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentco
ntentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontent
</td>
</tr>
</tbody>
</table>
13 changes: 13 additions & 0 deletions projects/demo/src/modules/components/table/examples/8/index.ts
Original file line number Diff line number Diff line change
@@ -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 {}
1 change: 1 addition & 0 deletions projects/demo/src/modules/components/table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export default class Page {
'Virtual scroll',
'Dynamic columns',
'Footer',
'Allow resize more than 100%',
];
}

0 comments on commit 69a2095

Please sign in to comment.