diff --git a/package.json b/package.json index a26300b4..b42a9a69 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "app", - "version": "5.6.68", + "version": "5.6.69", "description": "All-in-one bookmark manager", "author": "Rustem Mussabekov", "license": "MIT", diff --git a/src/co/bookmarks/edit/form/collection/suggested.js b/src/co/bookmarks/edit/form/collection/suggested.js index 3bc22b74..fe2fce50 100644 --- a/src/co/bookmarks/edit/form/collection/suggested.js +++ b/src/co/bookmarks/edit/form/collection/suggested.js @@ -1,5 +1,5 @@ import s from './suggested.module.styl' -import React, { useMemo, useCallback } from 'react' +import React, { useState, useMemo, useCallback } from 'react' import { useSelector } from 'react-redux' import { makeSuggestedFields } from '~data/selectors/bookmarks' import { makeCollectionPath } from '~data/selectors/collections' @@ -43,6 +43,10 @@ export default function BookmarkEditFormCollectionSuggested({ item, events: { on const getSuggestedFields = useMemo(()=>makeSuggestedFields(), []) const { collections=[] } = useSelector(state=>getSuggestedFields(state, item)) + //expand + const [expanded, setExpanded] = useState(false) + const onMouseOver = useCallback(()=>setExpanded(true), []) + //click const onSuggestionClick = useCallback(e=>{ const _id = parseInt(e.currentTarget.getAttribute('data-id')) @@ -55,7 +59,9 @@ export default function BookmarkEditFormCollectionSuggested({ item, events: { on return (
+ data-expanded={expanded} + data-is-new={item.collectionId <= 0} + onMouseOver={onMouseOver}> {collections.map(id=>(