@@ -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 ) => {
@@ -190,10 +203,11 @@ class Lane extends Component {
190203 return (
191204 < Header >
192205 < Title style = { titleStyle } > { title } </ Title >
193- { label &&
206+ { label && (
194207 < RightContent >
195208 < span style = { labelStyle } > { label } </ span >
196- </ RightContent > }
209+ </ RightContent >
210+ ) }
197211 </ Header >
198212 )
199213 }
@@ -207,18 +221,20 @@ class Lane extends Component {
207221 < Droppable droppableId = { id } type = "card" index = { index } isDropDisabled = { isDropDisabled } >
208222 { ( dropProvided , dropSnapshot ) => {
209223 const isDraggingOver = dropSnapshot . isDraggingOver
210- return < Section
211- { ...otherProps }
212- key = { id }
213- onClick = { ( ) => onLaneClick && onLaneClick ( id ) }
214- innerRef = { ref => this . laneDidMount ( ref , dropProvided . innerRef ) }
215- isDraggingOver = { isDraggingOver }
216- { ...dropProvided . draggableProps } >
217- { this . renderHeader ( ) }
218- { this . renderDragContainer ( ) }
219- { loading && < Loader /> }
220- </ Section >
221- } }
224+ return (
225+ < Section
226+ { ...otherProps }
227+ key = { id }
228+ onClick = { ( ) => onLaneClick && onLaneClick ( id ) }
229+ innerRef = { ref => this . laneDidMount ( ref , dropProvided . innerRef ) }
230+ isDraggingOver = { isDraggingOver }
231+ { ...dropProvided . draggableProps } >
232+ { this . renderHeader ( ) }
233+ { this . renderDragContainer ( ) }
234+ { loading && < Loader /> }
235+ </ Section >
236+ )
237+ } }
222238 </ Droppable >
223239 )
224240 }
@@ -255,6 +271,8 @@ Lane.defaultProps = {
255271 onCardAdd : ( ) => { }
256272}
257273
258- const mapDispatchToProps = dispatch => ( { actions : bindActionCreators ( laneActions , dispatch ) } )
274+ const mapDispatchToProps = dispatch => ( {
275+ actions : bindActionCreators ( laneActions , dispatch )
276+ } )
259277
260278export default connect ( null , mapDispatchToProps ) ( Lane )
0 commit comments