MCPcopy Create free account
hub / github.com/microsoft/data-formulator / flushNow

Function flushNow

src/views/SimpleChartRecBox.tsx:1196–1209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1194 let lastDispatched = '';
1195 let flushTimer: ReturnType<typeof setTimeout> | null = null;
1196 const flushNow = () => {
1197 if (flushTimer) {
1198 clearTimeout(flushTimer);
1199 flushTimer = null;
1200 }
1201 if (accumulatedMarkdown === lastDispatched) return;
1202 lastDispatched = accumulatedMarkdown;
1203 const titleMatch = accumulatedMarkdown.match(/^#\s+(.+)$/m);
1204 dispatch(dfActions.updateGeneratedReportContent({
1205 id: reportId,
1206 content: accumulatedMarkdown,
1207 title: titleMatch ? titleMatch[1].trim() : undefined,
1208 }));
1209 };
1210 const scheduleFlush = () => {
1211 if (flushTimer) return;
1212 flushTimer = setTimeout(() => {

Callers 2

scheduleFlushFunction · 0.85
SimpleChartRecBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected