Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
style(views/table): improve autocomplete styling
Elian Dorandcad23316d37
diff --git a/apps/client/src/widgets/view_widgets/table_view/index.ts b/apps/client/src/widgets/view_widgets/table_view/index.tsindex bd65176d19..a16cbb9c5c 100644--- a/apps/client/src/widgets/view_widgets/table_view/index.ts+++ b/apps/client/src/widgets/view_widgets/table_view/index.ts@@ -34,6 +34,14 @@ const TPL = /*html*/`right: 0;bottom: 0;}++ .tabulator-cell .autocomplete {+ position: absolute;+ top: 50%;+ transform: translateY(-50%);+ background: transparent;+ outline: none !important;+ }</style><div class="header">diff --git a/apps/client/src/widgets/view_widgets/table_view/relation_editor.ts b/apps/client/src/widgets/view_widgets/table_view/relation_editor.tsindex 9db63af14f..6a1bc334bd 100644--- a/apps/client/src/widgets/view_widgets/table_view/relation_editor.ts+++ b/apps/client/src/widgets/view_widgets/table_view/relation_editor.ts@@ -12,6 +12,7 @@ export function RelationEditor(cell: CellComponent, onRendered, success, cancel,//create and style editorconst editor = document.createElement("input");+const $editor = $(editor);editor.classList.add("form-control");@@ -43,8 +44,11 @@ export function RelationEditor(cell: CellComponent, onRendered, success, cancel,editor.focus();});- //return the editor element- return editor;+ const container = document.createElement("div");+ container.classList.add("input-group");+ container.classList.add("autocomplete");+ container.appendChild(editor);+ return container;};export function RelationFormatter(cell: CellComponent, formatterParams, onRendered) {