Skip to content

Commit 5721f70

Browse files
committed
fix(files): remove counter offset that prevented checkbox toggling
1 parent 853a2a7 commit 5721f70

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,6 @@ const MarkdownPreview = memo(function MarkdownPreview({
237237
[onCheckboxToggle]
238238
)
239239

240-
const committedCheckboxCount = useMemo(
241-
() => (committed ? (committed.match(/^[ \t]*(?:[-*+]|\d+[.)]) +\[[ xX]\]/gm) ?? []).length : 0),
242-
[committed]
243-
)
244-
245240
checkboxCounterRef.current = 0
246241

247242
const committedMarkdown = useMemo(
@@ -254,8 +249,6 @@ const MarkdownPreview = memo(function MarkdownPreview({
254249
[committed, components]
255250
)
256251

257-
checkboxCounterRef.current = committedCheckboxCount
258-
259252
return (
260253
<div ref={scrollRef} className='h-full overflow-auto p-6'>
261254
{committedMarkdown}

0 commit comments

Comments
 (0)