From e6cc111a6425e80e23b91252e1d8d4e75784a7fe Mon Sep 17 00:00:00 2001 From: RC Date: Sat, 13 Jan 2018 13:28:53 +0530 Subject: [PATCH] fix: Make editable prop explicit for Board, Lane and Card components https://github.com/rcdexta/react-trello/issues/50#issuecomment-357253696 --- src/components/BoardContainer.js | 4 +++- src/components/Card.js | 6 ++++-- src/components/Lane.js | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/BoardContainer.js b/src/components/BoardContainer.js index 6e5a6064c..fa5ed8bd9 100644 --- a/src/components/BoardContainer.js +++ b/src/components/BoardContainer.js @@ -112,7 +112,9 @@ BoardContainer.propTypes = { } BoardContainer.defaultProps = { - onDataChange: () => {} + onDataChange: () => {}, + editable: false, + draggable: false } const mapStateToProps = state => { diff --git a/src/components/Card.js b/src/components/Card.js index be8183d07..dc5a14166 100644 --- a/src/components/Card.js +++ b/src/components/Card.js @@ -130,7 +130,8 @@ const cardTarget = { Card.defaultProps = { cardStyle: {}, customCardLayout: false, - onDelete: () => {} + onDelete: () => {}, + editable: false } Card.propTypes = { @@ -146,7 +147,8 @@ Card.propTypes = { handleDragStart: PropTypes.func, handleDragEnd: PropTypes.func, customCardLayout: PropTypes.bool, - customCard: PropTypes.node + customCard: PropTypes.node, + editable: PropTypes.bool } export default flow( diff --git a/src/components/Lane.js b/src/components/Lane.js index e59e3048a..ef5d7493d 100644 --- a/src/components/Lane.js +++ b/src/components/Lane.js @@ -229,7 +229,8 @@ Lane.propTypes = { onCardClick: PropTypes.func, onCardDelete: PropTypes.func, onCardAdd: PropTypes.func, - addCardLink: PropTypes.node + addCardLink: PropTypes.node, + editable: PropTypes.bool } Lane.defaultProps = { @@ -237,6 +238,7 @@ Lane.defaultProps = { titleStyle: {}, labelStyle: {}, label: undefined, + editable: false, onCardAdd: () => {} }