[arvados-workbench2] updated: 2.7.0-209-gc178ba28

git repository hosting git at public.arvados.org
Fri Nov 3 18:15:53 UTC 2023


Summary of changes:
 src/views-components/side-panel/side-panel-collapsed.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

       via  c178ba288276f6383703fb9b7e513ff78f68b917 (commit)
      from  5f48a19354d8503c7967c22af2caedf30f1f1056 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c178ba288276f6383703fb9b7e513ff78f68b917
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Fri Nov 3 14:15:50 2023 -0400

    19302: added useeffect for icon highlight Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/views-components/side-panel/side-panel-collapsed.tsx b/src/views-components/side-panel/side-panel-collapsed.tsx
index 8458daf8..6d19c8e0 100644
--- a/src/views-components/side-panel/side-panel-collapsed.tsx
+++ b/src/views-components/side-panel/side-panel-collapsed.tsx
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import React, { ReactElement, useState } from 'react'
+import React, { ReactElement, useEffect, useState } from 'react'
 import { connect } from 'react-redux'
 import { ProjectsIcon, ProcessIcon, FavoriteIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon'
 import { List, ListItem, Tooltip } from '@material-ui/core'
@@ -106,8 +106,9 @@ export const SidePanelCollapsed = withStyles(styles)(
     connect(mapStateToProps, mapDispatchToProps)(({ classes, user, selectedPath, navToHome, navTo }: WithStyles & any) => {
         const [selectedIcon, setSelectedIcon] = useState(selectedPath)
 
+        useEffect(() => setSelectedIcon(selectedPath), [selectedPath])
+
         const handleClick = (cat: TCollapsedCategory) => {
-            setSelectedIcon(selectedPath)
             if (cat.name === SidePanelCollapsedCategory.PROJECTS) navToHome(user.uuid)
             else navTo(cat.navTarget)
         }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list