diff --git a/app/assets/javascripts/components/AutocompleteTagInput.tsx b/app/assets/javascripts/components/AutocompleteTagInput.tsx index 9d5bedaf1..8ccfb3d56 100644 --- a/app/assets/javascripts/components/AutocompleteTagInput.tsx +++ b/app/assets/javascripts/components/AutocompleteTagInput.tsx @@ -17,6 +17,7 @@ export const AutocompleteTagInput = observer(({ appState }: Props) => { autocompleteTagHintVisible, autocompleteTagResults, tags, + tagsContainerMaxWidth, } = appState.noteTags; const [dropdownVisible, setDropdownVisible] = useState(false); @@ -94,12 +95,13 @@ export const AutocompleteTagInput = observer(({ appState }: Props) => { return (
0 ? 'mt-2' : 'mt-1'}`} + className={`${tags.length > 0 ? 'mt-2' : ''}`} > 0 ? 'w-80' : 'w-70 mr-10'} bg-default text-xs + color-text no-border h-7 focus:outline-none focus:shadow-none focus:border-bottom`} value={autocompleteSearchQuery} onChange={onSearchQueryChange} type="text" @@ -111,8 +113,8 @@ export const AutocompleteTagInput = observer(({ appState }: Props) => { {dropdownVisible && (autocompleteTagResults.length > 0 || autocompleteTagHintVisible) && ( 0 ? 'w-80' : 'w-70 mr-10'} sn-dropdown flex flex-col py-2 absolute`} + style={{ maxHeight: dropdownMaxHeight, maxWidth: tagsContainerMaxWidth }} >
{autocompleteTagResults.map((tagResult) => ( diff --git a/app/assets/javascripts/components/NoteTagsContainer.tsx b/app/assets/javascripts/components/NoteTagsContainer.tsx index 80de7936e..8d94cdf42 100644 --- a/app/assets/javascripts/components/NoteTagsContainer.tsx +++ b/app/assets/javascripts/components/NoteTagsContainer.tsx @@ -21,7 +21,7 @@ const NoteTagsContainer = observer(({ appState }: Props) => { return (