feat: show list name on header
This commit is contained in:
@@ -35,6 +35,11 @@ const NEW_ITEM_INPUT_ID = 'new-item-input'
|
||||
*/
|
||||
export function focusNewItemInput(pathname: string): void {
|
||||
if (pathname !== '/') return
|
||||
refocusNewItemInput()
|
||||
}
|
||||
|
||||
/** Puts the cursor back in the "add an item" input of the page on screen, if it has one. */
|
||||
export function refocusNewItemInput(): void {
|
||||
document.getElementById(NEW_ITEM_INPUT_ID)?.focus()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user