On May 27, 2020, at 4:39 AM, Kavita Jain <kv1...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knockoutjs/81056374-018e-4507-9d80-03b15595b131%40googlegroups.com.
Try making your self.y a KnockoutComputed type? It will be based on self.x values and update automatically when self.x changes.Sent from my iPhoneOn May 27, 2020, at 4:39 AM, Kavita Jain <kv1...@gmail.com> wrote:
I have an observable array and from this observable array, constructing an dataArrayProvider. how can i empty this dataArrayprovider.--For eg.self.x = ko.observableArray([]);//updating x with some vales say {4 5 6 }self.y = new ArrayDataProvider(self.x, { keyAttributes: "id" });later, I m clearing this observable arrayx.removeAll();but I dont know how to clear data for ArrayDataProvider. plz help out.Thanks
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knock...@googlegroups.com.
I’m not familiar with the ArrayDataProvider you reference, but it should be something along these lines:
self.x = ko.observableArray([]);
self.y = ko.computed(function(){
return new ArrayDataProvider(self.x, { keyAttributes: "id" });
}, self);
Sent from Mail for Windows 10
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/knockoutjs/1feacd9e-4088-4154-82a8-a861f9e2dbec%40googlegroups.com.