diff --git a/package.json b/package.json index 4c03fa9f..c53f9d5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ObeoNetwork/react-trello", - "version": "2.4.4", + "version": "2.4.5", "description": "Pluggable components to add a trello like kanban board to your application", "main": "dist/index.js", "files": [ diff --git a/src/controllers/BoardContainer.js b/src/controllers/BoardContainer.js index bf2be8bd..1acf69a8 100644 --- a/src/controllers/BoardContainer.js +++ b/src/controllers/BoardContainer.js @@ -165,7 +165,6 @@ class BoardContainer extends Component { 'draggable', 'laneDraggable', 'cardDraggable', - 'collapsibleLanes', 'canAddLanes', 'hideCardDeleteIcon', 'tagStyle', @@ -189,7 +188,7 @@ class BoardContainer extends Component { getChildPayload={index => this.getLaneDetails(index)} groupName={this.groupName}> {reducerData.lanes.map((lane, index) => { - const {id, droppable, ...otherProps} = lane + const {id, droppable, collapsible, collapsed, ...otherProps} = lane const laneToRender = ( diff --git a/src/controllers/Lane.js b/src/controllers/Lane.js index 7ede892e..3a7f75a7 100644 --- a/src/controllers/Lane.js +++ b/src/controllers/Lane.js @@ -17,7 +17,7 @@ class Lane extends Component { loading: false, currentPage: this.props.currentPage, addCardMode: false, - collapsed: false, + collapsed: this.props.collapsed, isDraggingOver: false } @@ -235,7 +235,7 @@ class Lane extends Component { } toggleLaneCollapsed = () => { - this.props.collapsibleLanes && this.setState(state => ({collapsed: !state.collapsed})) + this.props.collapsible && this.setState(state => ({collapsed: !state.collapsed})) } render() { @@ -243,7 +243,7 @@ class Lane extends Component { const { id, cards, - collapsibleLanes, + collapsible, components, onLaneClick, onLaneScroll, @@ -271,10 +271,11 @@ class Lane extends Component { droppable, editable, editLaneTitle, + collapsed: collapsedProps, ...otherProps } = this.props const allClassNames = classNames('react-trello-lane', this.props.className || '') - const showFooter = collapsibleLanes && cards.length > 0 + const showFooter = collapsible && cards.length > 0 return (