From 72c8d4132c2aac2fb3b34071b61bd61dbcbeeae8 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Thu, 2 May 2024 10:57:27 +0200 Subject: [PATCH] fixed tag view for multiline tags --- src/Components/Map/Subcomponents/Controls/SearchControl.tsx | 4 ++-- src/Components/Profile/TagsWidget.tsx | 2 +- src/Components/Templates/TagView.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx index a694d82b..b6ed1c3a 100644 --- a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx +++ b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx @@ -104,8 +104,8 @@ export const SearchControl = () => { {hideSuggestions || Array.from(geoResults).length == 0 && itemsResults.length == 0 && tagsResults.length == 0 && !isGeoCoordinate(value)|| value.length == 0? "" :
{tagsResults.length > 0 && -
- {tagsResults.map(tag => ( +
+ {tagsResults.slice(0, 3).map(tag => (
{ addFilterTag(tag) let params = new URLSearchParams(window.location.search); diff --git a/src/Components/Profile/TagsWidget.tsx b/src/Components/Profile/TagsWidget.tsx index 55a6992b..49173ed5 100644 --- a/src/Components/Profile/TagsWidget.tsx +++ b/src/Components/Profile/TagsWidget.tsx @@ -82,7 +82,7 @@ export const TagsWidget = ({placeholder, containerStyle, defaultTags, onUpdate}) }} className={`tw-input tw-input-bordered tw-cursor-text ${containerStyle}`}>
{defaultTags.map((tag) => ( -
+
{decodeTag(tag.name)} diff --git a/src/Components/Templates/TagView.tsx b/src/Components/Templates/TagView.tsx index b560b71d..832e8aa7 100644 --- a/src/Components/Templates/TagView.tsx +++ b/src/Components/Templates/TagView.tsx @@ -6,7 +6,7 @@ export const TagView = ({tag, heighlight, onClick} : {tag: Tag, heighlight?: boo return ( // Use your imagination to render suggestions. -
+
{decodeTag(tag.name)}