From a4ca694b479a7f7866699abc175ec30216ab60d1 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Fri, 19 Mar 2021 14:08:40 +0100 Subject: [PATCH] assign a fixed width to each table column in scenario, test if it makes a difference for #307 --- src/scenario/scenario.js | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/scenario/scenario.js b/src/scenario/scenario.js index 4557dea..80f2e60 100644 --- a/src/scenario/scenario.js +++ b/src/scenario/scenario.js @@ -168,7 +168,7 @@ class Scenario extends React.Component { componentDidUpdate(prevProps, prevState) { // check whether file data has been loaded if (this.state.filesToDownload && this.state.filesToDownload.length > 0) { - if (this.state.files != prevState.files) { + if (this.state.files !== prevState.files) { if (!this.state.zipfiles) { let fileToDownload = FileStore.getState().filter(file => file.id === this.state.filesToDownload[0]) if (fileToDownload.length === 1 && fileToDownload[0].data) { @@ -777,44 +777,50 @@ class Scenario extends React.Component { checkbox checkboxDisabled={(index) => !this.usesExternalIC(index)} onChecked={(index, event) => this.onConfigChecked(index, event)} - width='30' + width={20} /> {this.state.currentUser.role === "Admin" ? : <> } this.setState({ editOutputSignalsModal: true, modalConfigData: this.state.configs[index], modalConfigIndex: index })} + width={150} /> this.setState({ editInputSignalsModal: true, modalConfigData: this.state.configs[index], modalConfigIndex: index })} + width={150} /> this.signalsAutoConf(index)} + width={150} /> this.getICName(icID)} + width={300} /> : <> } @@ -913,13 +920,17 @@ class Scenario extends React.Component { dataKey='name' link='/dashboards/' linkKey='id' + width={300} /> + dataKey='grid' + width={100} + /> + this.modifyResultNoColumn(id, result)} + width={70} /> this.downloadResultData(index)} + width={300} /> : <> } this.setState({