Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

widget Observable not cleaned out #258

Description

@Bubleguy

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'
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions