mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 08:19:07 +02:00
docs: improve sidebar items custom props docs (#8888)
This commit is contained in:
parent
35183d7d87
commit
14586895ae
13 changed files with 42 additions and 20 deletions
|
@ -46,8 +46,12 @@ function APITableRow(
|
|||
id={id}
|
||||
tabIndex={0}
|
||||
ref={history.location.hash === anchor ? ref : undefined}
|
||||
onClick={() => {
|
||||
history.push(anchor);
|
||||
onClick={(e) => {
|
||||
const isLinkClick =
|
||||
(e.target as HTMLElement).tagName.toUpperCase() === 'A';
|
||||
if (!isLinkClick) {
|
||||
history.push(anchor);
|
||||
}
|
||||
}}
|
||||
onKeyDown={(e: React.KeyboardEvent) => {
|
||||
if (e.key === 'Enter') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue