fix(core): fix target block cannot be reached when clicking affine-link multiple times (#10473)

Closes: [BS-2702](https://linear.app/affine-design/issue/BS-2702/超链接无法滚动到指定block)
This commit is contained in:
fundon
2025-04-01 14:46:34 +00:00
parent d8997576a5
commit 8427293d36
4 changed files with 73 additions and 2 deletions
@@ -34,6 +34,7 @@ import {
useServices,
} from '@toeverything/infra';
import clsx from 'clsx';
import { nanoid } from 'nanoid';
import { memo, useCallback, useEffect, useRef, useState } from 'react';
import { useParams } from 'react-router-dom';
import type { Subscription } from 'rxjs';
@@ -207,6 +208,7 @@ const DetailPageImpl = memo(function DetailPageImpl() {
mode: params?.mode,
blockIds: params?.blockIds,
elementIds: params?.elementIds,
refreshKey: nanoid(),
},
{
at: at,