Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleting the last card in a lane - "react-trello": "2.2.11", #498

Open
anitapeppercorn opened this issue Mar 3, 2022 · 0 comments
Open

Comments

@anitapeppercorn
Copy link

Describe the bug
unable to add a card to the lane or drag a card into the lane after deleting the last card in lane

To Reproduce
Steps to reproduce the behavior:
I am using the board component with the features as below
<Board
draggable
editable
canAddLanes //new added
editLaneTitle //new added
handleDragStart={handleDragStart}
handleDragEnd={handleDragEnd}
handleLaneDragStart={handleLaneDragStart}//new added
handleLaneDragEnd={handleLaneDragEnd}//new added
onDataChange={shouldReceiveNewData}
onCardAdd={handleCardAdd}
// onBeforeCardDelete={onBeforeCardDelete}//new added
onCardDelete={onCardDelete}//new added
onCardUpdate={onCardUpdate}//new added
onCardMoveAcrossLanes={onCardMoveAcrossLanes}//new added
onLaneAdd={onLaneAdd}//new added
onLaneDelete={onLaneDelete}//new added
onLaneUpdate={onLaneUpdate}//new added
data={datalanecreate(thisboard)}
eventBusHandle={setEventBus}
style={(BoardClass)}
/>

  1. When I Go to the board and delete all the existing cards in a lane
  2. Then I am after that no longer able to add cards or move cards to the lane
  3. When I attempt to add a card to a lane I get the following error message: 4. LaneHelper.js:51 Uncaught TypeError: Cannot read properties of undefined (reading 'find')
    at LaneHelper.js:51:1
    at Array.filter ()
    at Object.appendCardsToLane (LaneHelper.js:51:1)
    at Object.appendCardToLane (LaneHelper.js:82:1)
    at boardReducer (BoardReducer.js:23:1)
    at dispatch (redux.js:288:1)
    at Object.addCard (redux.js:546:1)
    at Object.onAdd (Lane.js:124:1)
    at NewCardForm.js:33:1
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
    at invokeGuardedCallback (react-dom.development.js:4056:1)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4070:1)
    at executeDispatch (react-dom.development.js:8243:1)
    at processDispatchQueueItemsInOrder (react-dom.development.js:8275:1)
    at processDispatchQueue (react-dom.development.js:8288:1)
    at dispatchEventsForPlugins (react-dom.development.js:8299:1)
    at react-dom.development.js:8508:1
    at batchedEventUpdates$1 (react-dom.development.js:22396:1)
    at batchedEventUpdates (react-dom.development.js:3745:1)
    at dispatchEventForPluginEventSystem (react-dom.development.js:8507:1)
    at attemptToDispatchEvent (react-dom.development.js:6005:1)
    at dispatchEvent (react-dom.development.js:5924:1)
    at unstable_runWithPriority (scheduler.development.js:468:1)
    at runWithPriority$1 (react-dom.development.js:11276:1)
    at discreteUpdates$1 (react-dom.development.js:22413:1)
    at discreteUpdates (react-dom.development.js:3756:1)
    at dispatchDiscreteEvent (react-dom.development.js:5889:1)
  4. When I attempt top drag a card into the lane, I get the following error message LaneHelper.js:51 Uncaught TypeError: Cannot read properties of undefined (reading 'find')
    at LaneHelper.js:51:1
    at Array.filter ()
    at Object.appendCardsToLane (LaneHelper.js:51:1)
    at Object.appendCardToLane (LaneHelper.js:82:1)
    at Object.moveCardAcrossLanes (LaneHelper.js:164:1)
    at boardReducer (BoardReducer.js:29:1)
    at dispatch (redux.js:288:1)
    at Object.moveCardAcrossLanes (redux.js:546:1)
    at Lane.onDragEnd (Lane.js:157:1)
    at Object.onDrop (Lane.js:227:1)
    at functionProps.onDrop (Container.js:83:1)
    at index.js:1:1
    at index.js:1:1
    at Object.handleDrop (index.js:1:1)
    at index.js:1:1
    at Array.forEach ()
    at index.js:1:1
    at t (index.js:1:1)
    at index.js:1:1

Expected behavior
I expect to be able to add cards or move cards into a lane after deleting the last card

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [iOS]
  • Browser [ chrome ]
  • Version [e.g. 22]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant