diff --git a/src/components/ArticleV3/Article.js b/src/components/ArticleV3/Article.js index db5ef15c..cc536ebf 100644 --- a/src/components/ArticleV3/Article.js +++ b/src/components/ArticleV3/Article.js @@ -62,6 +62,11 @@ const Article = ({ console.info('[Article] onCellClickHandler', dataHref) setSelectedDataHref(dataHref) } + + if (e.target.hasAttribute('data-idx')) { + e.preventDefault(); + setSelectedCellIdx(e.target.getAttribute('data-idx')); + } } return ( diff --git a/src/components/ArticleV3/ArticleScrollTo.js b/src/components/ArticleV3/ArticleScrollTo.js index 480d4b2b..606a4ee4 100644 --- a/src/components/ArticleV3/ArticleScrollTo.js +++ b/src/components/ArticleV3/ArticleScrollTo.js @@ -19,7 +19,7 @@ const ArticleScrollTo = () => { } } useEffect(() => { - if(selectedCellIdxFromStore !== -1 && selectedCellIdx !== -1 && selectedCellIdxFromStore !== selectedCellIdx) { + if(selectedCellIdxFromStore !== -1 && selectedCellIdxFromStore !== selectedCellIdx) { moveTo(selectedCellIdxFromStore) setQuery({ [DisplayLayerCellIdxQueryParam]: selectedCellIdxFromStore }) }