72 |
80 |
86 |
87 |
88 |
92 |
93 | {
94 | this.props.columnHeadings.map(column =>
95 |
96 | {column}
97 |
98 | )
99 | }
100 |
101 |
102 |
108 | {
109 | this.props.rows.slice(
110 | this.state.currentPage * this.perPage,
111 | (this.state.currentPage + 1) * this.perPage
112 | ).map((row, index) =>
113 |
114 |
115 |
120 |
121 | {row[0]}
122 | {(row[1]['score'] === undefined)? '1, '+row[1]['count']: row[1]['score'].toFixed(3)+', '+row[1]['count']}
123 |
124 | )
125 | }
126 |
127 |
128 |
129 |
130 | ...}
135 | breakClassName={"break-me"}
136 | pageCount={(this.props.rows || []).length/this.perPage}
137 | marginPagesDisplayed={1}
138 | pageRangeDisplayed={1}
139 | onPageChange={(page) => {this.setState({currentPage: page.selected})}}
140 | containerClassName={"pagination"}
141 | subContainerClassName={"pages pagination"}
142 | activeClassName={"active"} />
143 |
144 |
145 | )
146 | }
147 | }
148 |
149 | MultiselectTable.propTypes = {
150 | rows: PropTypes.array,
151 | columnHeadings: PropTypes.array,
152 | onRowSelection: PropTypes.func,
153 | resetSelection: PropTypes.bool
154 | }
155 |
156 | export default MultiselectTable;
157 |
--------------------------------------------------------------------------------
/client/src/components/Terms.js:
--------------------------------------------------------------------------------
1 | // Filename: Terms.js
2 | // Purpose: This is an intermediate component between Body.js and TermsList.js. It handles the changes in Terms card.
3 | // Author: Sonia Castelo (scastelo2@gmail.com)
4 | import React, {Component} from 'react';
5 | import {Card, CardHeader, CardMedia} from 'material-ui/Card';
6 | import TermsList from './TermsList';
7 | import Avatar from 'material-ui/Avatar';
8 | import Assignment from 'material-ui/svg-icons/action/assignment-returned';
9 | import Divider from 'material-ui/Divider';
10 | import $ from 'jquery';
11 | import CircularProgress from 'material-ui/CircularProgress';
12 |
13 |
14 | class CircularProgressSimple extends React.Component{
15 | render(){
16 | return(
17 |