Premium support for our pure JavaScript UI components


Post by aneventchin »

Hello, can you provide a demo of having Gantt and Scheduler Pro on a single page and connected using react.

Based on the demo and some other forum answers I created something like this:

  return (
    <div id="sf-workflow-container">
      <BryntumGantt
        ref={gantt}
        container="sf-workflow-container"
        {...ganttConfig}
      />
      <BryntumWidget type="splitter" container="sf-workflow-container" />
      <BryntumSchedulerPro
        container="sf-workflow-container"
        {...schedulerConfig}
      />
    </div>
  );

but adding the 'partner' property

{
...
partner: gantt,
...
}

to the scheduler's config gives me an error, so this is probably not the correct way.


Post by pmiklashevich »

to the scheduler's config gives me an error

Please always produce the full context, error messages, stacktrace, etc.

Setting a partner as a config is not possible in React. But partnering can be done dynamically.
You can see it in action here: https://bryntum.com/examples/gantt/resourcehistogram/

    // setup partnership between gantt and histogram
    useEffect(() => {
        histogramRef.current.instance.addPartner(ganttRef.current.instance);
    }, []);

The same is true for SchedulerPro as a partnered timeline.

We don't have a demo showing SchedulerPro + Gantt, but we have a ticket to add such. https://github.com/bryntum/support/issues/1517

Pavlo Miklashevych
Sr. Frontend Developer


Post by aneventchin »

Adding this produces this error:

C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17 Uncaught Error: ViewPreset name config replaced by base config. See https://www.bryntum.com/docs/scheduler/#guides/upgrades/3.0.0.md
    at _0x5b0724.changeViewPreset (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at _0x5b0724.set (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at _0x5b0724.set (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at _0x5b0724.setConfig (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at _0x5b0724.addPartner (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at _0x5b0724.set partner (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at C:\Repos\Platform\core\browser\src\js\app\src\sop\workflows\components\WorkflowContentElement.js:22
    at commitHookEffectListMount (C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:19730)
    at commitPassiveHookEffects (C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:19768)
    at HTMLUnknownElement.callCallback (C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:184)
changeViewPreset @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17
set @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17
set @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17
setConfig @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17
addPartner @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17
set partner @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17
(anonymous) @ C:\Repos\Platform\core\browser\src\js\app\src\sop\workflows\components\WorkflowContentElement.js:22
commitHookEffectListMount @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:19730
commitPassiveHookEffects @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:19768
callCallback @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:184
invokeGuardedCallbackDev @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:236
invokeGuardedCallback @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:287
flushPassiveEffectsImpl @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:22848
unstable_runWithPriority @ C:\Repos\Platform\core\browser\src\js\app\node_modules\scheduler\cjs\scheduler.development.js:653
runWithPriority$1 @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:10980
flushPassiveEffects @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:22796
performSyncWorkOnRoot @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:21728
(anonymous) @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:11078
unstable_runWithPriority @ C:\Repos\Platform\core\browser\src\js\app\node_modules\scheduler\cjs\scheduler.development.js:653
runWithPriority$1 @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:10980
flushSyncCallbackQueueImpl @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:11078
flushSyncCallbackQueue @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:11055
scheduleUpdateOnFiber @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:21199
enqueueSetState @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:12616
Component.setState @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react\cjs\react.development.js:471
(anonymous) @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt-react\WrapperHelper.js:414
requestAnimationFrame (async)
updateGeneration @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt-react\WrapperHelper.js:413
processCellContent @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt-react\WrapperHelper.js:518
renderCell @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:133952
render @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:133706
renderFromRow @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:134938
reinitialize @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:134159
renderRows @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:139919
functionChainRunner @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50234
plugInto.<computed> @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50191
onPaint @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:140034
onPaint @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:186287
functionChainRunner @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50234
plugInto.<computed> @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50191
callback @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:5767
trigger @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:48209
triggerPaint @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:80382
render @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:78543
render @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:60985
render @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:140078
render @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:187339
functionChainRunner @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50234
plugInto.<computed> @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50191
finalizeInit @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:78066
finalizeInit @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:137759
construct @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:78033
construct @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:193375
construct @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:188977
construct @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:186178
construct @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:112084
construct @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:187888
construct @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:110985
Base @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:5572
Localizable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:45068
Events @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:47334
Delayable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:45622
Identifiable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:49735
Factoryable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:48468
Widget @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:77016
Container @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:59908
Toolable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:83804
Panel @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:69341
Pluggable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50678
State @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50801
GridElementEvents @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:142251
GridFeatures @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:143119
GridNavigation @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:143304
GridResponsive @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:143802
GridSelection @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:143979
GridState @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:144919
GridSubGrids @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:145176
LoadMaskable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:50323
GridBase @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:137150
TimelineDateMapper @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:191734
TimelineDomEvents @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:192121
TimelineEventRendering @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:192386
TimelineScroll @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:192674
TimelineViewPresets @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:192885
TimelineZoomable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:193318
RecurringEvents @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:188961
TimelineBase @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:185850
CrudManagerView @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:149054
GanttDom @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:111443
GanttRegions @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:111613
GanttScroll @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:111740
GanttState @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:111915
ProjectConsumer @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:153765
GanttStores @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:112012
GanttTimelineDateMapper @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:112228
Delayable @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:45622
EventNavigation @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:187817
TaskNavigation @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:112277
GanttBase @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:110635
Gantt @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt\gantt.umd.js:110522
createWidget @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt-react\WrapperHelper.js:139
componentDidMount @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\gantt-react\BryntumGantt.js:59
commitLifeCycles @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:19802
commitLayoutEffects @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:22796
callCallback @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:184
invokeGuardedCallbackDev @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:236
invokeGuardedCallback @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:287
commitRootImpl @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:22536
unstable_runWithPriority @ C:\Repos\Platform\core\browser\src\js\app\node_modules\scheduler\cjs\scheduler.development.js:653
runWithPriority$1 @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:10980
commitRoot @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:22332
finishSyncRender @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:21806
performSyncWorkOnRoot @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:21790
(anonymous) @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:11078
unstable_runWithPriority @ C:\Repos\Platform\core\browser\src\js\app\node_modules\scheduler\cjs\scheduler.development.js:653
runWithPriority$1 @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:10980
flushSyncCallbackQueueImpl @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:11078
flushSyncCallbackQueue @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:11055
batchedUpdates$1 @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:21862
notify @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-redux\es\utils\Subscription.js:19
notifyNestedSubs @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-redux\es\utils\Subscription.js:90
handleChangeWrapper @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-redux\es\utils\Subscription.js:95
dispatch @ C:\Repos\Platform\core\browser\src\js\app\node_modules\redux\es\redux.js:222
dispatch @ VM9:3856
(anonymous) @ C:\Repos\Platform\core\browser\src\js\app\node_modules\@redux-saga\core\dist\redux-saga-core.esm.js:1410
(anonymous) @ C:\Repos\Platform\core\browser\src\js\app\node_modules\redux-thunk\es\index.js:11
next @ C:\Repos\Platform\core\browser\src\js\app\src\sop\workflows\services\hooks\useWorkflowViewModelHook.js:43
SafeSubscriber.__tryOrUnsub @ C:\Repos\Platform\core\browser\src\src\internal\Subscriber.ts:266
SafeSubscriber.next @ C:\Repos\Platform\core\browser\src\src\internal\Subscriber.ts:208
Subscriber._next @ C:\Repos\Platform\core\browser\src\src\internal\Subscriber.ts:140
Subscriber.next @ C:\Repos\Platform\core\browser\src\src\internal\Subscriber.ts:100
Subscriber._next @ C:\Repos\Platform\core\browser\src\src\internal\Subscriber.ts:140
Subscriber.next @ C:\Repos\Platform\core\browser\src\src\internal\Subscriber.ts:100
SwitchMapSubscriber.notifyNext @ C:\Repos\Platform\core\browser\src\internal\operators\switchMap.ts:167
SimpleInnerSubscriber._next @ C:\Repos\Platform\core\browser\src\src\internal\innerSubscribe.ts:31
Subscriber.next @ C:\Repos\Platform\core\browser\src\src\internal\Subscriber.ts:100
(anonymous) @ C:\Repos\Platform\core\browser\src\internal\util\subscribeToPromise.ts:10
Promise.then (async)
(anonymous) @ C:\Repos\Platform\core\browser\src\internal\util\subscribeToPromise.ts:8
innerSubscribe @ C:\Repos\Platform\core\browser\src\src\internal\innerSubscribe.ts:116
SwitchMapSubscriber._innerSub @ C:\Repos\Platform\core\browser\src\internal\operators\switchMap.ts:141
SwitchMapSubscriber._next @ C:\Repos\Platform\core\browser\src\internal\operators\switchMap.ts:127
Subscriber.next @ C:\Repos\Platform\core\browser\src\src\internal\Subscriber.ts:100
(anonymous) @ C:\Repos\Platform\core\src\internal\observable\dom\fetch.ts:163
Promise.then (async)
(anonymous) @ C:\Repos\Platform\core\src\internal\observable\dom\fetch.ts:147
Observable._trySubscribe @ C:\Repos\Platform\core\browser\src\src\internal\Observable.ts:239
Observable.subscribe @ C:\Repos\Platform\core\browser\src\src\internal\Observable.ts:218
SwitchMapOperator.call @ C:\Repos\Platform\core\browser\src\internal\operators\switchMap.ts:100
Observable.subscribe @ C:\Repos\Platform\core\browser\src\src\internal\Observable.ts:215
CatchOperator.call @ C:\Repos\Platform\core\browser\src\internal\operators\catchError.ts:106
Observable.subscribe @ C:\Repos\Platform\core\browser\src\src\internal\Observable.ts:215
(anonymous) @ C:\Repos\Platform\core\browser\src\js\app\src\sop\workflows\services\hooks\useWorkflowViewModelHook.js:21
commitHookEffectListMount @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:19730
commitPassiveHookEffects @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:19768
callCallback @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:184
invokeGuardedCallbackDev @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:236
invokeGuardedCallback @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:287
flushPassiveEffectsImpl @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:22848
unstable_runWithPriority @ C:\Repos\Platform\core\browser\src\js\app\node_modules\scheduler\cjs\scheduler.development.js:653
runWithPriority$1 @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:10980
flushPassiveEffects @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:22796
(anonymous) @ C:\Repos\Platform\core\browser\src\js\app\node_modules\react-dom\cjs\react-dom.development.js:22696
workLoop @ C:\Repos\Platform\core\browser\src\js\app\node_modules\scheduler\cjs\scheduler.development.js:597
flushWork @ C:\Repos\Platform\core\browser\src\js\app\node_modules\scheduler\cjs\scheduler.development.js:552
performWorkUntilDeadline @ C:\Repos\Platform\core\browser\src\js\app\node_modules\scheduler\cjs\scheduler.development.js:164
Show 106 more frames
C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17 Uncaught Error: construct invoked during object destruction
    at _0x54a1ed.construct (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at _0x54a1ed.construct (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at new _0x39678d (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at new _0x1081d0 (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at new _0x3527ff (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at new _0xf180dc (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at new _0x4687a5 (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at new _0x54a1ed (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at _0x3778d6.createRecord (C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17)
    at C:\Repos\Platform\core\browser\src\js\app\node_modules\@bryntum\schedulerpro\schedulerpro.umd.js:17

Scheduler's config:

  const schedulerConfig = {
    minHeight: '20em',
    flex: 1,
    rowHeight: 45,
    eventColor: 'gantt-green',
    useInitialAnimation: false,
    viewPreset: 'weekAndDayLetter',
    columns: [
      {
        type: 'resourceInfo',
        field: 'name',
        text: 'Assignee',
        showEventCount: false,
        width: 330,
      },
      {
        text: 'Tasks',
        field: 'events.length',
        width: 160,
        editor: false,
        align: 'right',
      },
    ],
  };

and the component itself:

    <>
      <BryntumGantt
        ref={ganttRef}
        height="60%"
        container="sf-workflow-container"
        tbar={{ type: 'gantttoolbar', dispatch }}
        project={projectModel(data)}
        dependenciesFeature={false}
        dependencyEditFeature={false}
        columnLines={false}
        columnPickerFeature={false}
        rollupsFeature={false}
        baselinesFeature={false}
        progressLineFeature={false}
        filterFeature={true}
        cellEditFeature={false}
        taskDragFeature={false}
        taskDragCreateFeature={false}
        rowReorderFeature={false}
        taskEditFeature={false}
        projectLinesFeature={false}
        percentBarFeature={{ allowResize: false }}
        timeRangesFeature={{
          showCurrentTimeLine: true,
        }}
        {...ganttConfig}
      />
      <BryntumSplitter />
      <BryntumSchedulerPro
        ref={schedulerRef}
        dependenciesFeature={false}
        percentBarFeature={{ allowResize: false }}
        project={projectModel(data)}
        container="sf-workflow-container"
        {...schedulerConfig}
      />
    </>

Post by pmiklashevich »

There must be a problem with configuration. The error says: "ViewPreset name config replaced by base config". Please read this guide: https://www.bryntum.com/docs/gantt/#Scheduler/guides/upgrades/3.0.0.md#zooming-and-viewpresets
What's your sources version? Make sure you're using the latest sources and the two components are configured right. If you cannot find the root cause, please zip up your demo and send it to us, so we can inspect your code.

Pavlo Miklashevych
Sr. Frontend Developer


Post by aneventchin »

I am using the latest version of the gantt - 4.1.5 and the trial version of the scheduler 4.1.5.
This error appears only after adding the useEffect from above and persists even after completely removing the configurations.


Post by pmiklashevich »

There is a problem with using SchedulerPro with Gantt in one React app. We're working on the solution. Please subscribe to this ticket to get notified when it's done. https://github.com/bryntum/support/issues/2970

The error message you got looks different though. Please submit a runnable testcase so we can see what is going on in your app.

Pavlo Miklashevych
Sr. Frontend Developer


Post by aneventchin »

I am using the Advanced React demo and have simply included the splitter widget and the scheduler pro below the gantt component.


Post by saki »

Wait please for the ticket to be fixed, we will probably release it sooner than with version 5.x.x. Then it will be easy to use the working demo as a starting point.


Post Reply