diff --git a/src/views/search/arcadia/components/ArcResult/components/ArcResultEdit/ArcResultEditForm.tsx b/src/views/search/arcadia/components/ArcResult/components/ArcResultEdit/ArcResultEditForm.tsx index b00f7e6..4c7e39e 100644 --- a/src/views/search/arcadia/components/ArcResult/components/ArcResultEdit/ArcResultEditForm.tsx +++ b/src/views/search/arcadia/components/ArcResult/components/ArcResultEdit/ArcResultEditForm.tsx @@ -25,6 +25,9 @@ export function ArcResultEditForm(props: ArcResultEditViewProps) { const tagsInputRef: React.MutableRefObject = useRef(); const titleInputRef: React.MutableRefObject = useRef(); const descriptionInputRef: React.MutableRefObject = useRef(); + const DescriptionInputCharacterMaxLength: number = 950; + const InputCharacterMaxLength: number = 200; + const InputCharacterMinLength: number = 4; useEffect(() => { titleInputRef.current.focus(); @@ -64,6 +67,8 @@ export function ArcResultEditForm(props: ArcResultEditViewProps) { @@ -73,6 +78,8 @@ export function ArcResultEditForm(props: ArcResultEditViewProps) { @@ -92,8 +99,8 @@ export function ArcResultEditForm(props: ArcResultEditViewProps) { @@ -103,7 +110,7 @@ export function ArcResultEditForm(props: ArcResultEditViewProps) { inactiveItemsIndex) { + if (listValues.length && showAutoCompleteOptions && activeItemIndex > inactiveItemsIndex) { addToInput(listValues[activeItemIndex].tag); } sendSearchWord(); @@ -118,7 +118,7 @@ export function SearchBar(props: SearchBarProps) { searchInputRef.current.focus(); }; - const takeActionOnclick = (index: number) => { + const takeActionOnMouseDown = () => { setShowAutoCompleteOptions(false); addToInput(listValues[activeItemIndex].tag); sendSearchWord(); @@ -139,7 +139,7 @@ export function SearchBar(props: SearchBarProps) { key={item.tag} ref={(e: HTMLLIElement) => (addToListItemRefs(index, e))} onMouseEnter={() => setActiveItemIndex(index)} - onMouseDown={() => takeActionOnclick(index)} + onMouseDown={() => takeActionOnMouseDown()} className={index === activeItemIndex ? 'active' : ''} > {item.tag}