Skip to content

Commit

Permalink
MIDRC-550 Replace nested empty values with 'null' in explorer display (
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre authored Jan 3, 2024
1 parent 068f5c6 commit 40d9de1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/GuppyDataExplorer/ExplorerTable/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ class ExplorerTable extends React.Component {
const nestedChildFieldName = fieldStringsArray.slice(1, fieldStringsArray.length).join('.');
// some logic to handle depends on wether the child field in raw data is an array or not
if (_.isArray(row.value)) {
valueStr = row.value.map((x) => _.get(x, nestedChildFieldName)).join(', ');
valueStr = row.value.map((x) => {
let val = _.get(x, nestedChildFieldName);
// replace empty, null and undefined nested values with explicit "null" strings
// so that we can still display 1 value per nested row
if (val == null || val === '') val = 'null';
return val;
}).join(', ');
} else {
valueStr = _.get(row.value, nestedChildFieldName);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Workspace/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ class Workspace extends React.Component {
this.checkWorkspaceStatus();
break;
default:
message.error('There is an error when trying to launch your workspace');
message.error('There was an error when trying to launch your workspace');
this.setState({
workspaceID: null,
workspaceLaunchStepsConfig: null,
Expand Down

0 comments on commit 40d9de1

Please sign in to comment.