import React, { Component } from 'react'
import { Card, Icon, CardContent } from 'semantic-ui-react'
import './NoduleList.css'
import Nodule from '../../Collections/Nodules'
import NoduleListController from '../../Controllers/NoduleListController'
class NoduleList extends Component {
constructor () {
super()
this.nodules = new Nodule()
this.controller = new NoduleListController()
this.state = { nodules: this.nodules.getCollectionProps() }
document.addEventListener('updateNodules', this.updateNoduleList)
}
updateNoduleList = () => {
this.setState({nodules: this.nodules.getCollectionProps()})
}
renderTableListElements = () => {
const { nodules } = this.state
const noduleListElements = nodules.map(n =>