未捕获的类型错误:无法读取添加卡未定义的属性“laneId”

问题描述

添加卡片并将数据添加到表中后,我想使用从表返回的原始卡片 ID 更新卡片详细信息。为此,我使用了这样的 eventBusHandle :

import React,{Component,useEffect,useState} from 'react';
import Board from "react-trello";


const TaskBoard = (props) =>{
const [eventBus,setEventBus] = useState(undefined);

useEffect(() => {
        if (card.length !== 0) {
            eventBus.publish({type: 'ADD_CARD',laneId:card.column_id,cards: {id: card.id,title: card.title,label: "1 sec",description: card.description}});
        }
    },[card.length]);

return(
        <Board
        id="board1"
        components={components}
        style={{
            background: '#F1F2F4'
        }}
        data={boardData}
        draggable
        handleLaneDragStart={handleLaneDragStart}
        handleLaneDragEnd={handleLaneDragEnd}
        canAddLanes
        onLaneAdd={onLaneAdd}
        onLaneDelete={onLaneDelete}
        handleDragEnd={handleDragEnd}
        onCardDelete={onCardDelete}
        onCardAdd={onCardAdd}
        editable
        eventBusHandle={setEventBus}
        />
    );

}

我需要更新真实卡号以删除或移动其他地方。

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)