react-trello
react-trello copied to clipboard
pass props to LaneHeader and Card components
Hello
With the old way of adding a LaneHeader i could easily add custom props. How can i add props with the new way with the components object?
for example:
render() {
const { data, children, customLaneHeader, onDragEnd, onLaneScroll } = this.props
const components = {
...(customLaneHeader ? { LaneHeader: customLaneHeader } : {}),
...(children ? { Card: children } : {})
}
return (
<Board
data={data}
draggable
laneDraggable={false}
handleDragEnd={(cardId, sourceLaneId, targetLaneId, position, cardDetails) => {
if (sourceLaneId === targetLaneId) return false
onDragEnd && onDragEnd(targetLaneId, cardDetails)
}}
onLaneScroll={onLaneScroll}
components={components}
/>
)
}
and in another file i have:
customLaneHeader={
<LaneHeader
toggleSelectAllDeals={this.toggleSelectAllDeals}
addBoardColumnRef={this.addBoardColumnRef}
dataType='deal'
hasActions
boardHeaders={this.props.boardHeaders}
updateDealsStatusFollowupDate={this.updateDealsStatusFollowupDate}
/>
}
Thanks
@rcdexta any info please?
@rcdexta Is there a way to get rid off this tooltip from the card styling or from both Lane and card?
@garimahans15 what does your question got in common with this open issue? can you please remove it from here and create a new, relevant one?