web/admin: truncate prompt label when too long

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-07 17:58:07 +02:00
parent 070745e764
commit 10fd1c8120

View file

@ -14,6 +14,7 @@ import "../../../elements/forms/DeleteBulkForm";
import "../../../elements/forms/ModalForm";
import { TableColumn } from "../../../elements/table/Table";
import { TablePage } from "../../../elements/table/TablePage";
import { truncate } from "../../../utils";
import "./PromptForm";
@customElement("ak-stage-prompt-list")
@ -81,7 +82,7 @@ export class PromptListPage extends TablePage<Prompt> {
row(item: Prompt): TemplateResult[] {
return [
html`${item.fieldKey}`,
html`${item.label}`,
html`${truncate(item.label, 20)}`,
html`${item.type}`,
html`${item.order}`,
html`${item.promptstageSet?.map((stage) => {