WF-keep search result& search visibility 83/73783/2
authorYarin Dekel <yarind@amdocs.com>
Wed, 28 Nov 2018 12:26:22 +0000 (14:26 +0200)
committerEinav Keidar <einavw@amdocs.com>
Thu, 29 Nov 2018 09:30:32 +0000 (09:30 +0000)
Issue-ID: SDC-1963
Change-Id: I81faaa3229db830475b6d827b578cb361c744228
Signed-off-by: Yarin Dekel <yarind@amdocs.com>
workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx
workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogReducer-test.js
workflow-designer-ui/src/main/frontend/src/features/catalog/catalogReducer.js
workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx

index 73ef654..0f3d970 100644 (file)
@@ -101,6 +101,7 @@ class CatalogView extends Component {
             ...catalog,
             searchNameFilter: searchValue
         });
+        sessionStorage.setItem('searchNameFilter', searchValue);
     };
 
     render() {
index 406e2d5..264e811 100644 (file)
@@ -34,6 +34,7 @@ describe('Catalog Reducer', () => {
         sort: {
             [NAME]: ASC
         },
+        searchNameFilter: '',
         items: [
             {
                 id: 'c5b7ca1a0f7944bfa948b85b32c5f314',
index 18507c2..db7bc43 100644 (file)
@@ -29,7 +29,9 @@ export const initialState = {
     sort: {
         [NAME]: ASC
     },
-    status: WORKFLOW_STATUS.ACTIVE
+    status: WORKFLOW_STATUS.ACTIVE,
+    //In order to save state inside iframe session
+    searchNameFilter: sessionStorage.getItem('searchNameFilter') || ''
 };
 
 const catalogReducer = (state = initialState, action) => {
index 24dbca4..ef1f0f3 100644 (file)
@@ -25,7 +25,7 @@ class ExpandableInput extends React.Component {
         value: PropTypes.string
     };
 
-    state = { showInput: false };
+    state = { showInput: !!this.props.value };
 
     handleRef = input => {
         this.domNode = input;