-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kendo controls cannot be used from bind() or attached() #795
Comments
Hey. Some Kendo controls get odd behavior when you initialize it on an element before that element is attached to the dom. So the bridge initializes kendo controls from the attached lifecycle callback. Unfortunately the attached callback on the viewmodel is called before the attached callback of child components, such as the bridge components. That's why you can't access the kendo controls from attached because they are not initialized yet. I recommend using the k-on-ready callback as mentioned in the docs, that way you know for sure the control is initialized |
Most controls can be safely initialized from within the bind callback of a custom element, which means that you can use it from the attached callback of your view model. Kendo is one of few which you can't initialize from bind without getting weird issues |
I have also had success that if a control needs binding after attached, utilize a custom plugin that adds "after-attached" callback. Unfortunatley it is not in npm and only jspm format but you can easily get around that. https://github.com/aurelia-ui-toolkits/aurelia-after-attached-plugin |
The documentation states that
Does this refer to when using aurelia-kendo-bridge or in general? I was under the impression that one of the advantages of Aurelia was the compatability with 'vanilla' libraries.
The text was updated successfully, but these errors were encountered: