diff options
Diffstat (limited to 'workflow-designer-ui/src')
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; |