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
refactor(views/table): better cleanup
Elian Doranf3350bc8f574
diff --git a/apps/client/src/widgets/view_widgets/table_view/col_editing.ts b/apps/client/src/widgets/view_widgets/table_view/col_editing.tsindex 2d0120fd31..2d3fe5b66b 100644--- a/apps/client/src/widgets/view_widgets/table_view/col_editing.ts+++ b/apps/client/src/widgets/view_widgets/table_view/col_editing.ts@@ -10,12 +10,13 @@ import { renameColumn } from "./bulk_actions";export default class TableColumnEditing extends Component {private attributeDetailWidget: AttributeDetailWidget;- private newAttributePosition?: number;- private existingAttributeToEdit?: Attribute;private api: Tabulator;- private newAttribute?: Attribute;private parentNote: FNote;+ private newAttribute?: Attribute;+ private newAttributePosition?: number;+ private existingAttributeToEdit?: Attribute;+constructor($parent: JQuery<HTMLElement>, parentNote: FNote, api: Tabulator) {super();const parentComponent = glob.getComponentByEl($parent[0]);@@ -95,7 +96,9 @@ export default class TableColumnEditing extends Component {}resetNewAttributePosition() {- this.newAttributePosition = 0;+ this.newAttribute = undefined;+ this.newAttributePosition = undefined;+ this.existingAttributeToEdit = undefined;}getFAttributeFromField(field: string) {