fix: Remove unneeded wrapper code

This commit is contained in:
James Tan 2024-07-16 21:13:51 -05:00
parent c587f83890
commit 19f37fe56a

View file

@ -333,11 +333,7 @@ function addEditableTableRow(tracker: Tracker, entry: Entry, table: HTMLTableEle
await saveTracker(tracker, this.app, getFile(), getSectionInfo()); await saveTracker(tracker, this.app, getFile(), getSectionInfo());
}); });
if (!entry.subEntries?.length) expandButton.buttonEl.style.visibility = 'hidden'; if (!entry.subEntries?.length) expandButton.buttonEl.style.visibility = 'hidden';
let nameWrapper = nameField.cell.createDiv({cls: "simple-time-tracker-table-expandwrapper"}); nameField.cell.insertBefore(expandButton.buttonEl, nameField.label);
nameWrapper.style.marginLeft = nameField.label.style.marginLeft;
nameField.label.style.marginLeft = null;
nameWrapper.insertBefore(expandButton.buttonEl, null);
nameWrapper.insertBefore(nameField.label, null);
let entryButtons = row.createEl("td"); let entryButtons = row.createEl("td");
entryButtons.addClass("simple-time-tracker-table-buttons"); entryButtons.addClass("simple-time-tracker-table-buttons");