@@ -3,15 +3,16 @@ import Loader from './Loader'
33import PropTypes from 'prop-types'
44import Card from './Card'
55import {
6- Section ,
7- Header ,
8- Title ,
9- RightContent ,
10- DraggableList ,
11- Placeholder ,
12- AddCardLink ,
13- LaneWrapper , ScrollableLane ,
14- } from '../styles/Base' ;
6+ Section ,
7+ Header ,
8+ Title ,
9+ RightContent ,
10+ DraggableList ,
11+ Placeholder ,
12+ AddCardLink ,
13+ LaneWrapper ,
14+ ScrollableLane
15+ } from '../styles/Base'
1516import { bindActionCreators } from 'redux'
1617import { connect } from 'react-redux'
1718import update from 'immutability-helper'
@@ -44,7 +45,11 @@ class Lane extends Component {
4445 // if no cards present, stop retrying until user action
4546 node . scrollTop = node . scrollTop - 50
4647 } else {
47- this . props . actions . paginateLane ( { laneId : this . props . id , newCards : moreCards , nextPage : nextPage } )
48+ this . props . actions . paginateLane ( {
49+ laneId : this . props . id ,
50+ newCards : moreCards ,
51+ nextPage : nextPage
52+ } )
4853 }
4954 this . setState ( { loading : false } )
5055 } )
@@ -62,7 +67,7 @@ class Lane extends Component {
6267 laneDidMount = ( node , dragReference ) => {
6368 if ( node ) {
6469 node . addEventListener ( 'scroll' , this . handleScroll )
65- dragReference ( node )
70+ dragReference ( node )
6671 }
6772 }
6873
@@ -81,12 +86,20 @@ class Lane extends Component {
8186
8287 componentWillReceiveProps ( nextProps ) {
8388 if ( ! isEqual ( this . props . cards , nextProps . cards ) ) {
84- this . setState ( { cards : nextProps . cards , currentPage : nextProps . currentPage } )
89+ this . setState ( {
90+ cards : nextProps . cards ,
91+ currentPage : nextProps . currentPage
92+ } )
8593 }
8694 }
8795
8896 moveCardAcrossLanes = ( fromLaneId , toLaneId , cardId ) => {
89- toLaneId && this . props . actions . moveCardAcrossLanes ( { fromLaneId : fromLaneId , toLaneId : toLaneId , cardId : cardId } )
97+ toLaneId &&
98+ this . props . actions . moveCardAcrossLanes ( {
99+ fromLaneId : fromLaneId ,
100+ toLaneId : toLaneId ,
101+ cardId : cardId
102+ } )
90103 }
91104
92105 removeCard = ( laneId , cardId ) => {
@@ -185,10 +198,11 @@ class Lane extends Component {
185198 return (
186199 < Header >
187200 < Title style = { titleStyle } > { title } </ Title >
188- { label &&
201+ { label && (
189202 < RightContent >
190203 < span style = { labelStyle } > { label } </ span >
191- </ RightContent > }
204+ </ RightContent >
205+ ) }
192206 </ Header >
193207 )
194208 }
@@ -202,18 +216,20 @@ class Lane extends Component {
202216 < Droppable droppableId = { id } type = "card" index = { index } isDropDisabled = { isDropDisabled } >
203217 { ( dropProvided , dropSnapshot ) => {
204218 const isDraggingOver = dropSnapshot . isDraggingOver
205- return < Section
206- { ...otherProps }
207- key = { id }
208- onClick = { ( ) => onLaneClick && onLaneClick ( id ) }
209- innerRef = { ref => this . laneDidMount ( ref , dropProvided . innerRef ) }
210- isDraggingOver = { isDraggingOver }
211- { ...dropProvided . draggableProps } >
212- { this . renderHeader ( ) }
213- { this . renderDragContainer ( ) }
214- { loading && < Loader /> }
215- </ Section >
216- } }
219+ return (
220+ < Section
221+ { ...otherProps }
222+ key = { id }
223+ onClick = { ( ) => onLaneClick && onLaneClick ( id ) }
224+ innerRef = { ref => this . laneDidMount ( ref , dropProvided . innerRef ) }
225+ isDraggingOver = { isDraggingOver }
226+ { ...dropProvided . draggableProps } >
227+ { this . renderHeader ( ) }
228+ { this . renderDragContainer ( ) }
229+ { loading && < Loader /> }
230+ </ Section >
231+ )
232+ } }
217233 </ Droppable >
218234 )
219235 }
@@ -250,6 +266,8 @@ Lane.defaultProps = {
250266 onCardAdd : ( ) => { }
251267}
252268
253- const mapDispatchToProps = dispatch => ( { actions : bindActionCreators ( laneActions , dispatch ) } )
269+ const mapDispatchToProps = dispatch => ( {
270+ actions : bindActionCreators ( laneActions , dispatch )
271+ } )
254272
255273export default connect ( null , mapDispatchToProps ) ( Lane )
0 commit comments