MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / renderGroupedNormal

Method renderGroupedNormal

src/bases/TaskListView.ts:1889–1920  ·  view source on GitHub ↗
(
		items: TaskListRenderItem[],
		visibleProperties: string[] | undefined,
		cardOptions: TaskCardOptions
	)

Source from the content-addressed store, hash-verified

1887 }
1888
1889 private async renderGroupedNormal(
1890 items: TaskListRenderItem[],
1891 visibleProperties: string[] | undefined,
1892 cardOptions: TaskCardOptions
1893 ): Promise<void> {
1894 this.lastVirtualItems = [];
1895 // Populate group key lookup for cross-group drag detection
1896 this.syncGroupedDragMetadata(items);
1897
1898 for (const item of items) {
1899 if (item.type === "primary-header" || item.type === "sub-header") {
1900 const headerEl = this.createGroupHeader(item);
1901 this.itemsContainer!.appendChild(headerEl);
1902 } else {
1903 const cardEl = createTaskCard(
1904 item.task,
1905 this.plugin,
1906 visibleProperties,
1907 cardOptions
1908 );
1909 this.configureCardForManualReordering(cardEl, item.task, item.groupKey);
1910 this.itemsContainer!.appendChild(cardEl);
1911 this.currentTaskElements.set(item.task.path, cardEl);
1912 this.taskInfoCache.set(item.task.path, item.task);
1913 this.lastTaskSignatures.set(item.task.path, this.buildTaskSignature(item.task));
1914 }
1915 }
1916 this.lastCardRenderSignature = this.buildCardRenderSignature(
1917 visibleProperties,
1918 cardOptions
1919 );
1920 }
1921
1922 private createGroupHeader(headerItem: TaskListHeaderItem): HTMLElement {
1923 // Use correct document for pop-out window support

Callers 2

renderGroupedMethod · 0.95

Calls 7

createGroupHeaderMethod · 0.95
buildTaskSignatureMethod · 0.95
createTaskCardFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected