fix(ui): keep animationParent mounted to prevent auto-animate ghost node bugs

This commit is contained in:
NimBold
2026-06-29 11:19:48 +03:30
parent d5e0caac33
commit e79d32af74
+37 -35
View File
@@ -460,43 +460,45 @@ export const DownloadTable: React.FC<DownloadTableProps> = ({ filter }) => {
</div> </div>
<div className="download-table-body"> <div className="download-table-body">
{sortedDownloads.length === 0 ? ( <div className="download-table-list" ref={animationParent}>
<div className="downloads-empty-state"> {sortedDownloads.length === 0 ? (
<ArrowDownCircle aria-hidden="true" /> <div className="downloads-empty-state">
<div className="downloads-empty-title">No Downloads</div> <ArrowDownCircle aria-hidden="true" />
<div className="downloads-empty-description flex items-center justify-center mt-2.5 text-[13px] text-text-muted"> <div className="downloads-empty-title">No Downloads</div>
Click <Plus size={15} className="text-accent stroke-[3] mx-1.5" /> button or <div className="downloads-empty-description flex items-center justify-center mt-2.5 text-[13px] text-text-muted">
<span className="flex items-center mx-1.5"> Click <Plus size={15} className="text-accent stroke-[3] mx-1.5" /> button or
<span className="flex items-center justify-center px-1.5 py-0.5 bg-item-hover rounded border border-border-color shadow-sm min-w-[22px] min-h-[22px]"> <span className="flex items-center mx-1.5">
{isMac ? <Command size={12} strokeWidth={2.5} className="text-text-primary" /> : <span className="text-[10px] font-bold text-text-primary">Ctrl</span>} <span className="flex items-center justify-center px-1.5 py-0.5 bg-item-hover rounded border border-border-color shadow-sm min-w-[22px] min-h-[22px]">
{isMac ? <Command size={12} strokeWidth={2.5} className="text-text-primary" /> : <span className="text-[10px] font-bold text-text-primary">Ctrl</span>}
</span>
<span className="text-accent font-bold mx-1.5 text-[14px]">+</span>
<span className="flex items-center justify-center px-1.5 py-0.5 bg-item-hover rounded border border-border-color shadow-sm min-w-[22px] min-h-[22px]">
<span className="text-[11px] font-bold text-text-primary">V</span>
</span>
</span> </span>
<span className="text-accent font-bold mx-1.5 text-[14px]">+</span> to add downloads
<span className="flex items-center justify-center px-1.5 py-0.5 bg-item-hover rounded border border-border-color shadow-sm min-w-[22px] min-h-[22px]"> </div>
<span className="text-[11px] font-bold text-text-primary">V</span>
</span>
</span>
to add downloads
</div> </div>
</div> ) : (
) : ( <>
<div className="download-table-list" ref={animationParent}> {sortedDownloads.map((d, index) => (
{sortedDownloads.map((d, index) => ( <DownloadItemComponent
<DownloadItemComponent key={d.id}
key={d.id} downloadId={d.id}
downloadId={d.id} index={index}
index={index} tableGridTemplate={tableGridTemplate}
tableGridTemplate={tableGridTemplate} setContextMenu={handleContextMenu}
setContextMenu={handleContextMenu} handlePause={handlePause}
handlePause={handlePause} handleResume={handleResume}
handleResume={handleResume} getCategoryIcon={getCategoryIcon}
getCategoryIcon={getCategoryIcon} selectedIds={selectedIds}
selectedIds={selectedIds} onClick={handleItemClick}
onClick={handleItemClick} />
/> ))}
))} <div className="flex-1 min-h-0 bg-transparent pointer-events-none" />
<div className="flex-1 min-h-0 bg-transparent pointer-events-none" /> </>
</div> )}
)} </div>
</div> </div>
</div> </div>
</div> </div>