mirror of https://github.com/fantasticit/think.git
fix key
This commit is contained in:
parent
fc93feb24e
commit
103de8d263
|
@ -161,7 +161,7 @@ export const Tocs: React.FC<{ editor: Editor; getContainer: () => HTMLElement }>
|
||||||
? headings.map((toc) => {
|
? headings.map((toc) => {
|
||||||
return (
|
return (
|
||||||
<Anchor.Link
|
<Anchor.Link
|
||||||
key={toc.text}
|
key={'collapsed-' + toc.text}
|
||||||
href={`#${toc.id}`}
|
href={`#${toc.id}`}
|
||||||
title={
|
title={
|
||||||
<Tooltip key={toc.text} content={toc.text} position="right">
|
<Tooltip key={toc.text} content={toc.text} position="right">
|
||||||
|
@ -171,7 +171,7 @@ export const Tocs: React.FC<{ editor: Editor; getContainer: () => HTMLElement }>
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
: nestedHeadings.map((toc) => <Toc key={toc.text} toc={toc} collapsed={collapsed} />)}
|
: nestedHeadings.map((toc) => <Toc key={'!collapsed-' + toc.text} toc={toc} collapsed={collapsed} />)}
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue