Skip to content
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

widget Observable not cleaned out #258

Open
Bubleguy opened this issue Jan 2, 2019 · 0 comments
Open

widget Observable not cleaned out #258

Bubleguy opened this issue Jan 2, 2019 · 0 comments

Comments

@Bubleguy
Copy link

Bubleguy commented Jan 2, 2019

Description :
Use a widget and provide an observable (let say widgetDDL) that will received the widgetInstance after initialization.

Wrap the html node with an observable that will allow you to destroy the node (ex data-bind="if: myotherObs").

you can see that the kendo's 'detroy' method is call (triggered by domNodeDisposal) ... but the observable still refer the widgetInstance.

I would expect it to be null instead.

Full Example :
Html :

<div class="form-group" data-bind="if: DDLEnabled">
<input data-bind="kendoDropDownList: DDLConfig" id="DDLSelection" name="DDLSelection" type="text"></div>

ViewModel:

self.widgetDDL = ko.observable();
self.DDLEnabled = ko.observable(true);
self.DDLVal = ko.observable("");
self.DDLDatas = [{ Key: "key1", Value: "val1" }, { Key: "key2", Value: "val2" }];
self.DDLConfig = {
   value: self.DDLVal,
   widget: self.widgetDDL,
   optionLabel: 'Sélectionnez...',
   data: self.DDLDatas,
   dataTextField: 'Value',
   dataValueField: 'Key'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant