diff options
author | 2020-04-09 13:44:28 +0000 | |
---|---|---|
committer | 2020-04-09 13:44:28 +0000 | |
commit | ce32c94c3c8aa366100cd2d20c68d72f164f828d (patch) | |
tree | ac7875a38cd554899b621eb7749c4d58853086b7 /sdnr/wt/odlux/apps/connectApp/src/handlers | |
parent | ccf4300f55e4a4c3e7d11bd67f740263ad401b6d (diff) | |
parent | 09809bce94321fe3527a4203ad8ba1628b222936 (diff) |
Merge "Connect App Bugfix" into frankfurt
Diffstat (limited to 'sdnr/wt/odlux/apps/connectApp/src/handlers')
-rw-r--r-- | sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts b/sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts index 23a801424..302a981eb 100644 --- a/sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts +++ b/sdnr/wt/odlux/apps/connectApp/src/handlers/connectAppRootHandler.ts @@ -43,14 +43,17 @@ const currentOpenPanelHandler: IActionHandler<PanelId> = (state = null, action) interface guiCutThroughState { searchedElements: guiCutThrough[]; notSearchedElements: string[]; + unsupportedElements: string[]; } -const guiCutThroughHandler: IActionHandler<guiCutThroughState> = (state = { searchedElements: [], notSearchedElements: [] }, action) => { +const guiCutThroughHandler: IActionHandler<guiCutThroughState> = (state = { searchedElements: [], notSearchedElements: [], unsupportedElements:[] }, action) => { if (action instanceof AddWebUriList) { let notSearchedElements: string[]; let searchedElements: guiCutThrough[]; + let unsupportedElements: string[]; notSearchedElements = state.notSearchedElements.concat(action.notSearchedElements); + unsupportedElements = state.unsupportedElements.concat(action.unsupportedElements); //remove elements, which were just searched if (action.newlySearchedElements) { @@ -61,13 +64,14 @@ const guiCutThroughHandler: IActionHandler<guiCutThroughState> = (state = { sear searchedElements = state.searchedElements.concat(action.searchedElements); - state = { searchedElements: searchedElements, notSearchedElements: notSearchedElements } + state = { searchedElements: searchedElements, notSearchedElements: notSearchedElements, unsupportedElements: unsupportedElements } } else if (action instanceof RemoveWebUri) { const nodeId = action.element; const webUris = state.searchedElements.filter(item => item.nodeId !== nodeId); const knownElements = state.notSearchedElements.filter(item => item !== nodeId); - state = { notSearchedElements: knownElements, searchedElements: webUris }; + const unsupportedElement = state.unsupportedElements.filter(item => item != nodeId); + state = { notSearchedElements: knownElements, searchedElements: webUris, unsupportedElements: unsupportedElement }; } return state; } |