From f308679bd2a9474194c50edc8e65676dd8fe5bb4 Mon Sep 17 00:00:00 2001 From: James Rupert Tan Date: Fri, 7 Jun 2024 12:57:56 -0500 Subject: [PATCH] fix: Retain old formatting when editing row --- src/tracker.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tracker.ts b/src/tracker.ts index 20e4dd6..3360412 100644 --- a/src/tracker.ts +++ b/src/tracker.ts @@ -357,9 +357,7 @@ function addEditableTableRow(tracker: Tracker, entry: Entry, table: HTMLTableEle .onClick(async () => { if (nameField.editing()) { entry.name = nameField.endEdit(); - if (entry.subEntries?.length) { - expandButton.buttonEl.style.display = null; - } + expandButton.buttonEl.style.display = null; startField.endEdit(); entry.startTime = startField.getTimestamp(); if (!entryRunning) { @@ -372,9 +370,7 @@ function addEditableTableRow(tracker: Tracker, entry: Entry, table: HTMLTableEle renderNameAsMarkdown(nameField.label, getFile, component); } else { nameField.beginEdit(entry.name); - if (entry.subEntries?.length) { - expandButton.buttonEl.style.display = 'none'; - } + expandButton.buttonEl.style.display = 'none'; // only allow editing start and end times if we don't have sub entries if (!entry.subEntries) { startField.beginEdit(entry.startTime);