This is a migrated thread and some comments may be shown as answers.

_attachBubbleHandlers

1 Answer 51 Views
Hierarchical Data Source
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 2
Iron
Jack asked on 10 Oct 2018, 05:04 PM

I am designing a hierarchy of pages and components and I am trying to figure out what _attachBubbleHandlers is used for considering it basically does:

that._data.bind(ERROR, e => {
    that.trigger(ERROR, e);
});

where that._data is an ObservableArray which never triggers the error event.

See https://github.com/telerik/kendo-ui-core/blob/master/src/kendo.data.js#L4856

Please clarify.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 11 Oct 2018, 09:55 AM
Hello Jack,

You are right,.a plain ObservableArray cannot throw an error. But the HierarchyDataSource class is dedicated not only for ObservableArray class, but for DataSource instances as well. Those can throw an error and this specific code ensures that there is a bubbling of the parent event error to the child.

Regards,
Ianko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Hierarchical Data Source
Asked by
Jack
Top achievements
Rank 2
Iron
Answers by
Ianko
Telerik team
Share this question
or