jam-cloud/web/app/assets/javascripts/react-components/InstrumentCheckBoxList.js.j...

18 lines
558 B
CoffeeScript

context = window
rest = window.JK.Rest()
logger = context.JK.logger
@InstrumentCheckBoxList = React.createClass({
instruments: []
componentDidUnmount: () ->
@instruments = []
componentDidMount: () ->
rest.getInstruments().done (instruments) =>
@instruments = instruments
render: () ->
`<div className="InstrumentCheckBoxList react-component">
<CheckBoxList objectName='instruments' onItemChanged={this.props.onItemChanged} sourceObjects={this.instruments} selectedObjects={this.props.selectedInstruments}/>
</div>`
})