Our blazing fast Grid component built with pure JavaScript


Post by jakub.murawski »

Hi Bryntum Team,
I'm using Bryntum Gantt 5.4.0 and I wanted to use beforeDependencyEdit

2023-07-03_13h10_35.png
2023-07-03_13h10_35.png (1.66 KiB) Viewed 126 times

I read in the documentation if I return false it will stop showing default behavior.
https://bryntum.com/products/gantt/docs/api/Scheduler/feature/DependencyEdit#event-beforeDependencyEdit
But I my case it's showing it, even if I write return false.


Post by tasnim »

Hi,

I also tested with 5.4.0 Gantt and it works fine here

/**
 * Application
 */
import React, { Fragment } from 'react';

import { BryntumDemoHeader, BryntumThemeCombo, BryntumGantt } from '@bryntum/gantt-react';
import { ganttConfig } from './AppConfig';
import './App.scss';

const App = () => {
    // edit button click handler
    const handleEditClick = ({ record, grid : gantt }) => {
        gantt.editTask(record);
    };

const onBeforeDependencyEditHandler = () => false;

return (
    <Fragment>
        {/* BryntumDemoHeader component is used for Bryntum example styling only and can be removed */}
        <BryntumDemoHeader
            children={<BryntumThemeCombo />}
        />
        <BryntumGantt
            {...ganttConfig}
            onBeforeDependencyEdit={onBeforeDependencyEditHandler}
            extraData={{ handleEditClick }}
        />
    </Fragment>
);
};

export default App;

Any chance to see the beforeDependencyEdit function code?


Post by jakub.murawski »

Yes sure. I'm using this code.

2023-07-03_14h21_19.png
2023-07-03_14h21_19.png (5.3 KiB) Viewed 119 times

Post by tasnim »

Hi,

beforeDependencyEdit doesn't support async functions. But that sounds like a reasonable feature request. I've opened a feature request for this https://github.com/bryntum/support/issues/7109

All The Best,
Tasnim


Post by jakub.murawski »

Yes it would be good if it also has async support because beforeTaskEdit has this support and it's working perfect.


Post Reply