UNPKG

sqlpad

Version:

Web app for writing and running SQL queries and visualizing the results. Supports Postgres, MySQL, SQL Server, Crate and Vertica.

31 lines (28 loc) 875 B
import React from 'react' import ControlLabel from 'react-bootstrap/lib/ControlLabel' import ListGroup from 'react-bootstrap/lib/ListGroup' import QueryListRow from './QueryListRow' class QueryList extends React.Component { render() { var self = this var QueryListRows = this.props.queries.map(query => { return ( <QueryListRow config={this.props.config} key={query._id} query={query} selectedQuery={this.props.selectedQuery} handleQueryDelete={this.props.handleQueryDelete} handleQueryListRowMouseOver={self.props.handleQueryListRowMouseOver} /> ) }) return ( <div className="QueryList"> <ControlLabel>Queries</ControlLabel> <ListGroup className="QueryListContents">{QueryListRows}</ListGroup> </div> ) } } export default QueryList