Is there an event for when the show state of a CustomDataSource changes?

I have a sandcastle.

Is there?

I have tried attaching to loadingEvent, but that doesn’t work.

I can roll my own thing by writing more code when I change the show state myself, but I was hoping there was a built-in event that would fire an event when the value of show changed.

If there is not, perhaps it would be appropriate for a changed event to fire?

I found an answer that works, but I don’t like it.

An Entity will emit a definitionChanged event when the show state of the entity changes.

What I did is add a listener for the definitionChanged event to one of the entities in the CustomDataSource. When this listener is executed, I can make the assumption that the show state of the datasource has changed.

However, this feels like a hack rather than the way it is supposed to work.

I looks like it would be straightforward to do something similar for the CustomDataSource and create a new showStateChanged event for it to emit when the state changes.

If such a pull request would be accepted, I may be able to find the time to create one and get this feature in there. Would it?

It would make sense to implement a definitionChanged event for CustomDataSource, but that PR would be to large a task for me to take on at this time.

I guess this is a design issue rather than an implementation issue, CustomDataSource is just a manager, and when designing this API it may not be needed to manage too many events, which would make things confusing and complicated.


What advice do you have to resolve the issue?