Add edit button to column list, fix truncation on small panels
All checks were successful
build / build (push) Successful in 1m29s
All checks were successful
build / build (push) Successful in 1m29s
This commit is contained in:
@@ -4,11 +4,12 @@ import { Column } from '../duckdb.service';
|
|||||||
import { Checkbox, CheckboxChangeEvent } from 'primeng/checkbox';
|
import { Checkbox, CheckboxChangeEvent } from 'primeng/checkbox';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { Button } from 'primeng/button';
|
import { Button } from 'primeng/button';
|
||||||
|
import { Tooltip } from 'primeng/tooltip';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-column-editor',
|
selector: 'app-column-editor',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [AccordionModule, Checkbox, FormsModule, Button],
|
imports: [AccordionModule, Checkbox, FormsModule, Button, Tooltip],
|
||||||
template: `
|
template: `
|
||||||
<p-accordion [value]="0">
|
<p-accordion [value]="0">
|
||||||
<p-accordion-panel [value]="0">
|
<p-accordion-panel [value]="0">
|
||||||
@@ -26,11 +27,18 @@ import { Button } from 'primeng/button';
|
|||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
[for]="column.name"
|
[for]="column.name"
|
||||||
class="ml-2 grow shrink basis-0 truncate"
|
[pTooltip]="column.name"
|
||||||
|
tooltipPosition="bottom"
|
||||||
|
class="ml-2 grow shrink basis-0 truncate cursor-pointer"
|
||||||
>
|
>
|
||||||
{{ column.name }}
|
{{ column.name }}
|
||||||
</label>
|
</label>
|
||||||
<p-button icon="pi pi-pencil" text> </p-button>
|
<p-button
|
||||||
|
(onClick)="editColumn($index)"
|
||||||
|
icon="pi pi-pencil"
|
||||||
|
text
|
||||||
|
pTooltip="Edit Column"
|
||||||
|
></p-button>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -56,4 +64,6 @@ export class ColumnEditorComponent {
|
|||||||
return columns;
|
return columns;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected editColumn(index: number) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user