web/elements: render ChipGroup when checkboxes are enabled

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-10 20:12:57 +02:00
parent 75bc7c1cbd
commit ca2a4ffb59
1 changed files with 11 additions and 1 deletions

View File

@ -13,6 +13,8 @@ import AKGlobal from "../../authentik.css";
import "./TablePagination";
import "../EmptyState";
import "../chips/Chip";
import "../chips/ChipGroup";
import { EVENT_REFRESH } from "../../constants";
export class TableColumn {
@ -235,7 +237,15 @@ export abstract class Table<T> extends LitElement {
}
renderTable(): TemplateResult {
return html`<div class="pf-c-toolbar">
return html`
${this.checkbox ?
html`<ak-chip-group>
${this.selectedElements.map(el => {
return html`<ak-chip>${this.renderSelectedChip(el)}</ak-chip>`;
})}
</ak-chip-group>`:
html``}
<div class="pf-c-toolbar">
<div class="pf-c-toolbar__content">
${this.renderSearch()}
<div class="pf-c-toolbar__bulk-select">