diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-04-19 00:50:45 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-04-19 00:50:45 +0200 |
| commit | 9515fc2e473e3fc51fbf26b77d3f49122808ce1b (patch) | |
| tree | 9d8f382bae76855e7868abe74d35cfe50f33edc8 /client/table/citations.table.js | |
| parent | 03dae85958c9f4c4a41c9c5534cd54ccc1d04c5f (diff) | |
filter map by type
Diffstat (limited to 'client/table/citations.table.js')
| -rw-r--r-- | client/table/citations.table.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/table/citations.table.js b/client/table/citations.table.js index 178cc65b..8fe46b69 100644 --- a/client/table/citations.table.js +++ b/client/table/citations.table.js @@ -24,18 +24,20 @@ class CitationsTable extends Component { filteredCitations: [], } - componentDidMount(){ + componentDidMount() { this.updateCitations() } - componentDidUpdate(oldProps){ + + componentDidUpdate(oldProps) { if (this.props.payload.data.citations !== oldProps.payload.data.citations) { this.updateCitations() } } - updateCitations(){ + + updateCitations() { const { paper, citations } = this.props.payload.data if (!citations.length) this.setState({ formattedCitations: [] }) - console.log(citations.filter(a => a.title.match('Coarse'))) + // console.log(citations.filter(a => a.title.match('Coarse'))) const formattedCitations = citations.sort((a,b) => a.title.localeCompare(b.title)).map(citation => { const pdf_link = (citation.pdf && citation.pdf.length) ? citation.pdf[0] |
