aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYarin Dekel <yarind@amdocs.com>2018-11-28 14:26:22 +0200
committerEinav Keidar <einavw@amdocs.com>2018-11-29 09:30:32 +0000
commitd700ba7fae234c2a6e804ff746e4d78843a52616 (patch)
treeb67d7f46c5fc4f24de0ce7b0ae2648d907e4b0be
parente9657fd9f7e20ca5c7e21a64872dbbc9e2061013 (diff)
WF-keep search result& search visibility
Issue-ID: SDC-1963 Change-Id: I81faaa3229db830475b6d827b578cb361c744228 Signed-off-by: Yarin Dekel <yarind@amdocs.com>
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx1
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogReducer-test.js1
-rw-r--r--workflow-designer-ui/src/main/frontend/src/features/catalog/catalogReducer.js4
-rw-r--r--workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx2
4 files changed, 6 insertions, 2 deletions
diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx b/workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx
index 73ef6548..0f3d9702 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx
+++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/CatalogView.jsx
@@ -101,6 +101,7 @@ class CatalogView extends Component {
...catalog,
searchNameFilter: searchValue
});
+ sessionStorage.setItem('searchNameFilter', searchValue);
};
render() {
diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogReducer-test.js b/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogReducer-test.js
index 406e2d52..264e8112 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogReducer-test.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/__tests__/catalogReducer-test.js
@@ -34,6 +34,7 @@ describe('Catalog Reducer', () => {
sort: {
[NAME]: ASC
},
+ searchNameFilter: '',
items: [
{
id: 'c5b7ca1a0f7944bfa948b85b32c5f314',
diff --git a/workflow-designer-ui/src/main/frontend/src/features/catalog/catalogReducer.js b/workflow-designer-ui/src/main/frontend/src/features/catalog/catalogReducer.js
index 18507c21..db7bc43b 100644
--- a/workflow-designer-ui/src/main/frontend/src/features/catalog/catalogReducer.js
+++ b/workflow-designer-ui/src/main/frontend/src/features/catalog/catalogReducer.js
@@ -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) => {
diff --git a/workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx b/workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx
index 24dbca43..ef1f0f37 100644
--- a/workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx
+++ b/workflow-designer-ui/src/main/frontend/src/shared/searchInput/SearchInput.jsx
@@ -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;