26 lines
713 B
CoffeeScript
26 lines
713 B
CoffeeScript
context = window
|
|
rest = window.JK.Rest()
|
|
logger = context.JK.logger
|
|
|
|
@InstrumentCheckBoxList = React.createClass({
|
|
|
|
mixins: [Reflux.listenTo(@InstrumentStore,"onInstrumentsChanged")]
|
|
|
|
propTypes: {
|
|
onItemChanged: React.PropTypes.func.isRequired
|
|
}
|
|
|
|
getDefaultProps: () ->
|
|
selectedInstruments: []
|
|
|
|
getInitialState: () ->
|
|
{instruments: []}
|
|
|
|
onInstrumentsChanged: (instruments) ->
|
|
@setState({instruments: instruments})
|
|
|
|
render: () ->
|
|
`<div className="InstrumentCheckBoxList react-component">
|
|
<CheckBoxList objectName='instruments' onItemChanged={this.props.onItemChanged} sourceObjects={this.state.instruments} selectedObjects={this.props.selectedInstruments}/>
|
|
</div>`
|
|
}) |