From 05da65b2d01a75404059d7526b4cbb868f631dd7 Mon Sep 17 00:00:00 2001 From: Aijana Schumann Date: Fri, 13 Mar 2020 10:39:11 +0100 Subject: Fix odlux bugs Fix help and about app not scrollable Fix filter hiding and showing without user interaction and default sort in all tables Issue-ID: SDNC-1117 Signed-off-by: Aijana Schumann Change-Id: I5c6ff86c73a3b222a8d9022125454788496f6399 --- .../apps/connectApp/src/components/connectionStatusLog.tsx | 12 ++++++++++++ .../odlux/apps/connectApp/src/components/networkElements.tsx | 9 +++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'sdnr/wt/odlux/apps/connectApp/src/components') diff --git a/sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx b/sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx index ad7b247b0..96f6c8a6b 100644 --- a/sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx +++ b/sdnr/wt/odlux/apps/connectApp/src/components/connectionStatusLog.tsx @@ -35,6 +35,9 @@ const ConnectionStatusTable = MaterialTable as MaterialTableCtorType; +let initialSorted = false; + + class ConnectionStatusLogComponent extends React.Component { render(): JSX.Element { return ( @@ -46,6 +49,15 @@ class ConnectionStatusLogComponent extends React.Component ); }; + + componentDidMount() { + if (!initialSorted) { + initialSorted = true; + this.props.connectionStatusLogActions.onHandleExplicitRequestSort("timestamp", "desc"); + } else { + this.props.connectionStatusLogActions.onRefresh(); + } + } } export const ConnectionStatusLog = connect(mapProps, mapDispatch)(ConnectionStatusLogComponent); diff --git a/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx b/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx index d50a81ed5..53e10481a 100644 --- a/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx +++ b/sdnr/wt/odlux/apps/connectApp/src/components/networkElements.tsx @@ -83,7 +83,7 @@ type NetworkElementsListComponentState = { } const emptyRequireNetworkElement: NetworkElementConnection = { id: "", nodeId: "", host: "", port: 0, status: "Disconnected", isRequired: false }; - +let initialSorted = false; const NetworkElementTable = MaterialTable as MaterialTableCtorType; export class NetworkElementsListComponent extends React.Component { @@ -173,7 +173,12 @@ export class NetworkElementsListComponent extends React.Component, element: NetworkElementConnection) => { -- cgit 1.2.3-korg