Premium support for our pure JavaScript UI components


Post by jit@flowit.dk »

src.zip
Example demonstrating the problem
(9.58 KiB) Downloaded 19 times

Hi,

Please see attached example (tested with version 5.1.2).

Try changing e.g. the name/title of a task and click "Reload data". Changes are reverted.
Try changing the position of a task (move it above/below a sibling) and click "Reload data". The task's position is NOT restored.

Is this a bug or are we doing something wrong ?

-- Thanks

Best regards
Jimmy Thomsen


Post by marcio »

Hey Jimmy,

That looks like a bug, thanks for the report and the example. I create a ticket to fix it https://github.com/bryntum/support/issues/5336

Best regards,
Márcio


Post by marcio »

Hey Jimmy,

An update about that issue, is not a bug, for performance reasons, the React Gantt has the syncDataOnLoad config set to true by default, which will update the dataset and not replace it, if you set up that config to false, it'll work (I tested it here :) )

const ganttConfig: BryntumGanttProps = {
        "autoHeight": true,
        "width": "100%",
        "startDate": "2020-01-27",
        "endDate": "2025-12-30",
        "weekStartDay": 1,
        // "calendars": [],
        // "assignments": [],
        // "dependencies": [],
        // "resources": [],
        // "columns": [],
        "zoomKeepsOriginalTimespan": true,
        "zoomOnMouseWheel": true,
        "minZoomLevel": 5,
        "maxZoomLevel": 11,
        "zoomLevel": 7,
        project: {
            eventStore: {
                syncDataOnLoad : false,
            }
        }
    };

Best regards,
Márcio


Post by jit@flowit.dk »

Hi Marcio.

Thank you. How do we set it when using inline data?
We are not allowed to define 'project' alongside inline data (see attached screenshot).

Attachments
Screen Shot 2022-10-03 at 08.58.58.png
Screen Shot 2022-10-03 at 08.58.58.png (169.6 KiB) Viewed 135 times

Best regards
Jimmy Thomsen


Post by marcio »

Hey Jimmy,

To work with inline data we recommend using the BryntumProjectModel component to be able to set up some project configurations.

I created a basic demo with the code that you shared earlier, and you can also check our inline data demo to see how that's set up https://www.bryntum.com/examples/gantt/frameworks/react/javascript/inline-data/build/

Attachments
src.zip
(7.76 KiB) Downloaded 20 times

Best regards,
Márcio


Post Reply