Fix querynodeselect (for now)

master
Rohan Vazarkar 2018-01-19 12:32:45 -05:00
parent 7771af22c5
commit 92857f8c48
2 changed files with 53 additions and 49 deletions

View File

@ -20,34 +20,34 @@ import About from './components/Modals/About.jsx'
import { CSSTransition, TransitionGroup } from 'react-transition-group'; import { CSSTransition, TransitionGroup } from 'react-transition-group';
export default class AppContainer extends Component { export default class AppContainer extends Component {
render() { render() {
return ( return (
<TransitionGroup className="max"> <TransitionGroup className="max">
<CSSTransition classNames="mainfade" <CSSTransition classNames="mainfade"
appear={true} appear
timeout={1000}> timeout={1000}>
<div className="max"> <div className="max">
<GenericAlert /> <GenericAlert />
<ExportContainer /> <ExportContainer />
<LoadingContainer /> <LoadingContainer />
<SpotlightContainer /> <SpotlightContainer />
<GraphContainer /> <GraphContainer />
<SearchContainer /> <SearchContainer />
<LogoutModal /> <LogoutModal />
<ClearWarnModal /> <ClearWarnModal />
<ClearConfirmModal /> <ClearConfirmModal />
<ClearingModal /> <ClearingModal />
<CancelUploadModal /> <CancelUploadModal />
<SessionClearModal /> <SessionClearModal />
<RawQuery /> <RawQuery />
<MenuContainer /> <MenuContainer />
<Settings /> <Settings />
<ZoomContainer /> <ZoomContainer />
<QueryNodeSelect /> <QueryNodeSelect />
<About /> <About />
</div> </div>
</CSSTransition> </CSSTransition>
</TransitionGroup> </TransitionGroup>
); );
}; };
} }

View File

@ -50,28 +50,32 @@ export default class QueryNodeSelect extends Component {
} }
render() { render() {
var header = <QueryNodeSelectHeader length={this.state.data.length} title={this.state.queryData.boxTitle} dismiss={this._dismiss.bind(this)}/>;
return ( return (
<div className="queryNodeSelect" ref="outer"> <div className="queryNodeSelect" ref="outer">
<Panel header={header}> <Panel>
<If condition={this.state.data.length > 0}> <Panel.Heading>
<Then> {/* <QueryNodeSelectHeader length={this.state.data.length} title={this.state.queryData.boxTitle} dismiss={this._dismiss.bind(this)} />; */}
<ListGroup ref="list"> {this.state.queryData.boxTitle}
{ </Panel.Heading>
this.state.data.map(function(key){ <Panel.Body>
var x = <QueryNodeSelectItem key={key} label={key} click={this.handleClick.bind(this)} />; <If condition={this.state.data.length > 0}>
return x; <Then>
}.bind(this)) <ListGroup ref="list">
} {
</ListGroup> this.state.data.map(function(key){
</Then> var x = <QueryNodeSelectItem key={key} label={key} click={this.handleClick.bind(this)} />;
<Else>{() => return x;
<img src="src/img/loading.gif" /> }.bind(this))
} }
</Else> </ListGroup>
</If> </Then>
<Else>{() =>
<img src="src/img/loading.gif" />
}
</Else>
</If>
</Panel.Body>
</Panel> </Panel>
</div> </div>
); );
} }