Hide Resources that have no Events in Timeline

I have an application of Mobiscroll that is very similar to this example:-

How can I dynamically hide the Resource rows that have no events. The reason I want to do this is that I have a very large number of Resources but at a point in time only a small number will have Events defined for them.

I have found a resolution to my issue. Was more my lack of React experience, not a Mobiscroll issue.