fix: replace whitespace with a -
so that ids are valid and scroll to works (#4710)
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
This commit is contained in:
@ -19,7 +19,7 @@ export function KeybindingsSectionsList({
|
||||
key={category}
|
||||
onClick={() =>
|
||||
scrollRef.current
|
||||
?.querySelector(`#category-${category}`)
|
||||
?.querySelector(`#category-${category.replaceAll(/\s/g, '-')}`)
|
||||
?.scrollIntoView({
|
||||
block: 'center',
|
||||
behavior: 'smooth',
|
||||
|
Reference in New Issue
Block a user