Discuss anything related to web development but no technical support questions


Post by akalanka »

In BryntumSchedulerPro, how can i collapse multiple resource groups at once without iterating through each group and call resourceStore.collapse() ?

Requirement
I need to keep the collapsed resource groups persisted while changing the view in scheduler (In some scenarios, it requires to load resource data again ).

My Approach
I keep listening to 'toggleGroup' event and save the collapsed group ids in an array.
When the data is loaded, I restore the resource store grouping and then iterate through each group and restore the collapsed status by calling resourceStore.collapse(group);

Issue I have faced
When I try to restore collapsed state for many groups (like more than 20 groups), scheduler gets freezed and not responsive.

I'm looking for
A solution to restore the group collapsed state without my app gets freezed


Post by ghulam.ghous »

Unfortunately we do not have an API where you can collapse a specific records. It is either all or one. I have created a ticket to support this. https://github.com/bryntum/support/issues/9749. Please subscribe to it to keep track of updates. About the freezing issue, I was not able to reproduce it. I tried here: https://bryntum.com/products/schedulerpro/examples-scheduler/grouping/. Please see the clip and let me know what else I need to do to reproduce this issue:

Screen Recording 2024-08-05 at 6.10.59 PM.zip
(6.22 MiB) Downloaded 10 times

Regards,
Ghous


Post by akalanka »

Thank you ghulam for the reply. Since those are the only options available at the moment, I decided to go with collapsing one-by-one


Post by ghulam.ghous »

Hi there,

So your problem with page free got resolved? Hopefully we'll get this ticket resolved in couple of weeks.

Regards,
Ghous


Post by akalanka »

Hello ghulam.

No.

We have implemented a logic to collapse groups one-by-one when data is loaded to the scheduler.

But as we observed, collapsing a group is blocking the main thread and it makes the app to stuck for a small time.
When we do it for multiple groups, (our test scenario had around 20 groups, but real usage can have more groups).
the app gets stuck for a longer time.

So we decided to remove this feature from our app for the moment.
But this is an important feature for our end-users.

We want to ask you if you can provide a method in a later release of SchedulerPro, to collapse multiple groups at once by passing an array of groups or group-ids which needed to be collapsed, in a more efficient way.
It would be very much useful for our end-users.

Thank you


Post by ghulam.ghous »

Hi,

We want to ask you if you can provide a method in a later release of SchedulerPro, to collapse multiple groups at once by passing an array of groups or group-ids which needed to be collapsed, in a more efficient way.
It would be very much useful for our end-users.

We have a pr under review where we have added this functionality for the collapse and expand methods on the group feature. I believe it will be part of the upcoming patch release.

But as we observed, collapsing a group is blocking the main thread and it makes the app to stuck for a small time.
When we do it for multiple groups, (our test scenario had around 20 groups, but real usage can have more groups).
the app gets stuck for a longer time.

This shouldn't be the case. I will check this in our product once again.


Post Reply