Skip to content

Commit

Permalink
Fix rendering of message about unsupported output type
Browse files Browse the repository at this point in the history
Fixes #808

Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Aug 31, 2022
1 parent 4fc050a commit 8fbb35e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export interface AbstractOutputProps {
export interface AbstractOutputState {
outputStatus: string;
styleModel?: OutputStyleModel;
optionsDropdownOpen: boolean;
optionsDropdownOpen?: boolean;
additionalOptions?: boolean;
}

Expand Down Expand Up @@ -151,7 +151,7 @@ export abstract class AbstractOutputComponent<P extends AbstractOutputProps, S e
<button title="Show View Options" className='options-menu-button' onClick={this.openOptionsMenu}>
<FontAwesomeIcon icon={faBars} />
</button>
{this.state.optionsDropdownOpen && <div className="options-menu-drop-down" ref={this.optionsMenuRef}>
{this.state?.optionsDropdownOpen && <div className="options-menu-drop-down" ref={this.optionsMenuRef}>
{this.showOptions()}
</div>}
</div>}
Expand Down
18 changes: 8 additions & 10 deletions packages/react-components/src/components/null-output-component.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import { ResponseStatus } from 'tsp-typescript-client';
import { AbstractOutputComponent, AbstractOutputProps, AbstractOutputState } from './abstract-output-component';

type NullOutputState = AbstractOutputState & {
Expand All @@ -10,25 +11,22 @@ type NullOutputProps = AbstractOutputProps & {
export class NullOutputComponent extends AbstractOutputComponent<NullOutputProps, NullOutputState> {
constructor(props: NullOutputProps) {
super(props);
this.state = {
outputStatus: ResponseStatus.COMPLETED
};
}

renderMainArea(): React.ReactNode {
const treeWidth = Math.min(this.getMainAreaWidth(), this.props.style.chartOffset - this.getHandleWidth());
const chartWidth = this.getMainAreaWidth() - treeWidth;
return <React.Fragment>
<div className='output-component-tree disable-select'
style={{ width: treeWidth, height: this.props.style.height }}
>
{''}
</div>
<div className='output-component-chart' style={{ fontSize: 24, width: chartWidth, height: this.props.style.height, backgroundColor: '#3f3f3f', }}>
{'Not implemented yet!'}
<div className='message-main-area'>
Not implemented yet!
<br />
</div>
</React.Fragment>;
}

resultsAreEmpty(): boolean {
return true;
return false;
}

setFocus(): void {
Expand Down

0 comments on commit 8fbb35e

Please sign in to comment.