Page 1 of 1

[VUE 3] Toggle dependencies from scheduler instance

Posted: Fri Aug 02, 2024 4:45 pm
by harriskmt

Hello,

I'm trying to offer the user the ability to turn dependencies on or off on demand. However, I'm having a hard time achieving this from the scheduler component instance. I've used the Task editor customization Vue 3 + Vite 4 example and have zipped the changed files below. I would appreciate any help you can provide.


Re: [VUE 3] Toggle dependencies from scheduler instance

Posted: Fri Aug 02, 2024 5:45 pm
by marcio

Hey harriskmt,

Thanks for reaching out and welcome to our forums.

To disable/enable the dependencies, you can use

// disable
schedulerPro.features.dependencies.disabled = true;
// enable
schedulerPro.features.dependencies.disabled = false;

Where schedulerPro is the SchedulerPro instance (that you can check how to access here https://bryntum.com/products/schedulerpro/docs/guide/SchedulerPro/integration/vue/guide#bryntum-scheduler-pro-api-instance).

You can live it test running those snippets in the console on this demo https://bryntum.com/products/schedulerpro/examples/dependencies/.


Re: [VUE 3] Toggle dependencies from scheduler instance

Posted: Mon Aug 05, 2024 8:40 am
by harriskmt

Hello,

Apologies for the late reply. I tried your method, but it didn't work and threw the following error:

Uncaught (in promise) TypeError: can't assign to property "disabled" on false: not an object.

I tested it with the example you provided, and it works fine, but that example is in plain JavaScript. Could you please provide a working Vue example so I can see what I might be doing wrong?


Re: [VUE 3] Toggle dependencies from scheduler instance

Posted: Mon Aug 05, 2024 11:30 am
by ghulam.ghous

Hi there,

I have compiled an example in vue-3 + vite. Please check here:

taskeditor.zip
(274.7 KiB) Downloaded 11 times
Screen Recording 2024-08-05 at 2.28.25 PM.zip
(3.35 MiB) Downloaded 11 times

Please let us know, is this does not solve your problem.

Regards,
Ghous


Re: [VUE 3] Toggle dependencies from scheduler instance

Posted: Tue Aug 06, 2024 8:19 am
by harriskmt

Thank you, it solved my problem :)


Re: [VUE 3] Toggle dependencies from scheduler instance

Posted: Tue Aug 06, 2024 8:21 am
by ghulam.ghous

Glad to hear that. Happy coding :)