Our flexible Kanban board for managing tasks with drag drop


Post by yingtao »

when taskDrag from 'true' to 'false',task still can drag.
Image


Post by tasnim »

I cannot reproduce it. I tried the latest version 5.0.5. What version are you using?


Post by yingtao »

I also use 5.0.5 .


Post by tasnim »

Could you please provide a runnable test case and also steps to reproduce?


Post by yingtao »

you can copy these code to you example,then you can recurrence the bug.

/**
 * Application
 */
import React, { Fragment, FunctionComponent, useRef, useEffect, useState } from 'react';

import { BryntumDemoHeader, BryntumThemeCombo, BryntumTaskBoard } from '@bryntum/taskboard-react';
import { TaskBoard, ProjectModel } from '@bryntum/taskboard';
import { taskBoardConfig } from './AppConfig';
import './App.scss';

const App: FunctionComponent = () => {
    const taskBoardRef = useRef<BryntumTaskBoard>(null);
    const taskBoardInstance = () => taskBoardRef.current?.instance as TaskBoard;
    const [drag, setDrag] = useState(false)
    useEffect(() => {
        // This shows loading data
        // To load data automatically configure project with `autoLoad : true`
        const project = taskBoardInstance().project as ProjectModel;
        project.load();
    });

useEffect(()=>{
    setDrag(true)
},[])
console.log(drag)
return (
    <Fragment>
        <BryntumDemoHeader
            href = "../../../../../#example-frameworks-react-typescript-basic"
            children = {<BryntumThemeCombo />}
        />
        <BryntumTaskBoard
            ref = {taskBoardRef}
            {...taskBoardConfig}
            taskDragFeature={drag}
        />
    </Fragment>
);
};

export default App;

Post by yingtao »

I solved it, I use onBeforeTaskDrag return false to replase taskDrag。


Post Reply