fix: reload tabIndex after tags expansion
This commit is contained in:
@@ -14,6 +14,7 @@ type Props = {
|
||||
export const NoteTag: FunctionalComponent<Props> = ({ appState, tag }) => {
|
||||
const {
|
||||
tags,
|
||||
tagsContainerExpanded,
|
||||
tagsContainerMaxWidth,
|
||||
} = appState.activeNote;
|
||||
|
||||
@@ -48,7 +49,7 @@ export const NoteTag: FunctionalComponent<Props> = ({ appState, tag }) => {
|
||||
|
||||
useEffect(() => {
|
||||
reloadOverflowed();
|
||||
}, [reloadOverflowed, tags, tagsContainerMaxWidth]);
|
||||
}, [reloadOverflowed, tags, tagsContainerExpanded, tagsContainerMaxWidth]);
|
||||
|
||||
const contextMenuListener = (event: MouseEvent) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -134,6 +134,9 @@ export class ActiveNoteState {
|
||||
}
|
||||
|
||||
isTagOverflowed(tag: SNTag): boolean {
|
||||
if (this.tagsContainerExpanded) {
|
||||
return false;
|
||||
}
|
||||
const tagElement = this.getTagElement(tag);
|
||||
return tagElement ? this.isElementOverflowed(tagElement) : false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user