[arvados-workbench2] created: 2.4.0-380-g6ed29d15

git repository hosting git at public.arvados.org
Wed Dec 14 20:54:29 UTC 2022


        at  6ed29d15f871865afa2a2321075cbd9fdf2d46ba (commit)


commit 6ed29d15f871865afa2a2321075cbd9fdf2d46ba
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Dec 14 21:52:10 2022 +0100

    19865: Fixes selfClearProp passing to SearchInput in DataTable.
    
    Instead of passing the UUID of the selected object, pass the current location
    path, so navigation actions that change said path will trigger an input
    field reset, but selecting different items in the table won't.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx
index c7a296a6..052a5ae9 100644
--- a/src/components/data-explorer/data-explorer.tsx
+++ b/src/components/data-explorer/data-explorer.tsx
@@ -82,6 +82,7 @@ interface DataExplorerDataProps<T> {
     title?: React.ReactNode;
     paperKey?: string;
     currentItemUuid: string;
+    currentPath: string;
     elementPath?: string;
 }
 
@@ -157,7 +158,7 @@ export const DataExplorer = withStyles(styles)(
                 rowsPerPage, rowsPerPageOptions, onColumnToggle, searchLabel, searchValue, onSearch,
                 items, itemsAvailable, onRowClick, onRowDoubleClick, classes,
                 defaultViewIcon, defaultViewMessages, hideColumnSelector, actions, paperProps, hideSearchInput,
-                paperKey, fetchMode, currentItemUuid, title,
+                paperKey, fetchMode, currentItemUuid, currentPath, title,
                 doHidePanel, doMaximizePanel, doUnMaximizePanel, panelName, panelMaximized, elementPath
             } = this.props;
 
@@ -173,7 +174,7 @@ export const DataExplorer = withStyles(styles)(
                                         {!hideSearchInput && <SearchInput
                                             label={searchLabel}
                                             value={searchValue}
-                                            selfClearProp={currentItemUuid}
+                                            selfClearProp={currentPath}
                                             onSearch={onSearch} />}
                                     </div>}
                                     {actions}
diff --git a/src/components/search-input/search-input.tsx b/src/components/search-input/search-input.tsx
index 6d85ed22..fbb4f599 100644
--- a/src/components/search-input/search-input.tsx
+++ b/src/components/search-input/search-input.tsx
@@ -71,7 +71,7 @@ export const SearchInput = (props: SearchInputProps) => {
             () => {
                 props.onSearch(eventValue);
             },
-             props.debounce || DEFAULT_SEARCH_DEBOUNCE
+            props.debounce || DEFAULT_SEARCH_DEBOUNCE
         ));
     };
 
diff --git a/src/views-components/data-explorer/data-explorer.tsx b/src/views-components/data-explorer/data-explorer.tsx
index 06d97038..2f8eca11 100644
--- a/src/views-components/data-explorer/data-explorer.tsx
+++ b/src/views-components/data-explorer/data-explorer.tsx
@@ -27,6 +27,7 @@ const mapStateToProps = (state: RootState, { id }: Props) => {
     const currentRoute = state.router.location ? state.router.location.pathname : '';
     const currentRefresh = localStorage.getItem(LAST_REFRESH_TIMESTAMP) || '';
     const currentItemUuid = currentRoute === '/workflows' ? state.properties.workflowPanelDetailsUuid : state.detailsPanel.resourceUuid;
+    const currentPath = state.router.location?.pathname;
 
     return {
         ...dataExplorerState,
@@ -34,7 +35,8 @@ const mapStateToProps = (state: RootState, { id }: Props) => {
         currentRefresh: currentRefresh,
         currentRoute: currentRoute,
         paperKey: currentRoute,
-        currentItemUuid
+        currentItemUuid,
+        currentPath,
     };
 };
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list