Add column resizing and reordering
All checks were successful
build / build (push) Successful in 1m26s
All checks were successful
build / build (push) Successful in 1m26s
This commit is contained in:
@@ -21,8 +21,12 @@ import { Column, DuckdbService } from '../duckdb.service';
|
||||
template: `
|
||||
@if (file() && columns().length > 0) {
|
||||
<p-table
|
||||
[reorderableColumns]="true"
|
||||
[resizableColumns]="true"
|
||||
columnResizeMode="expand"
|
||||
[columns]="columns()"
|
||||
[value]="currentValue()"
|
||||
showGridlines
|
||||
[scrollable]="true"
|
||||
scrollHeight="400px"
|
||||
[rows]="100"
|
||||
@@ -34,7 +38,7 @@ import { Column, DuckdbService } from '../duckdb.service';
|
||||
<ng-template #header let-columns>
|
||||
<tr>
|
||||
@for (col of columns; track $index) {
|
||||
<th style="width: 20%">
|
||||
<th style="width: 20%" pReorderableColumn pResizableColumn>
|
||||
{{ col.name }}
|
||||
</th>
|
||||
}
|
||||
@@ -43,7 +47,7 @@ import { Column, DuckdbService } from '../duckdb.service';
|
||||
<ng-template #body let-rowData let-columns="columns">
|
||||
<tr style="height: 46px">
|
||||
@for (col of columns; track $index) {
|
||||
<td>
|
||||
<td pReorderableRowHandle>
|
||||
{{ rowData[col.name] }}
|
||||
</td>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user