Can I show only the group without any item,

Hi, 

I am using Timeline Grouping in the scheduler. and I want to show the group without any item(user / or like ). I map ti data in the group but it automatically hides the group if it hasn't second-level data.


I map group data like this 

const group = Response.data.data.map((x)=>({
text: x.location_job_role.name,
id: x.location_job_role.id,
color: '#00C49A',
isGroup: true,
}))

this.projectResourceDataSource = _.uniqBy(group,'id')
//

also, scheduler implements like this,

<e-resources>
<e-resource

:allow-multiple="allowMultiple"
:data-source="projectResourceDataSource"
:allowTextWrap='true'
color-field="color"
field="group_id"
id-field="id"
name="Projects"
text-field="text"
title="Choose Project"
id="res"

/>
<e-resource

:allow-multiple="allowMultiple"
:data-source="employeeDataSource"
color-field="color"
field="user_id"
group-i-d-field="groupId"
id-field="id"
image-field="image"
name="Employees"
text-field="text"
title="Employee"
/>
</e-resources>
</ejs-schedule>

</

Any ideas on what I am doing wrong?


Thanks

1 Reply

PN Praveenkumar Narasimhanaidu Syncfusion Team November 2, 2021 01:10 PM UTC

Hi Ruwan, 

Greetings from Syncfusion support..! 

We have validated your reported query “Can I show only the group without any item” at our end and let you know that it is mandatory to provide at least one resource data in dataSource collection to use grouping, this is the default behavior of our scheduler.  So, we suggest you avoid grouping with empty resource datasource. 
 
For more information about scheduler grouping, please refer following documentation link. 
 

Please get back to us if you need any further assistance. 

Regards, 
Praveenkumar 


Loader.
Up arrow icon