Declined
Last Updated: 16 Mar 2021 12:48 by ADMIN
Stacey
Created on: 10 Aug 2013 20:28
Category: MVVM
Type: Feature Request
77
.Where, .Select, .Single, .OrderBy, First on ObservableArray
It would be exponentially helpful if the "ObservableArray" implemented some basic "Where/Select/Single" methods. This would assist in searching through them and give Kendo UI a much needed facelift in the array department.

Behavior would be, theoretically, as follows...

var viewModel = kendo.observable({
    Users: [
    {
       id: 1,
       name: "Stacey"
     },
     {
       id: 2,
       name: "Dylan"
     },
     {
       id: 3,
       name: "John"
     }
 ]
});

var idSearch = 1;

var result = kendo.Search(viewModelArray).Where(function(x) { return x.id == idSearch });

or ...

var result = kendo.Search(viewModelArray)
.Single(function(x) { return x.id == idSearch });

or possibly even chained like in "linqjs"

var result = kendo.Search(viewModelArray)
.Where(function(x) { return x.id == idSearch })
.Single();

7 comments
ADMIN
Viktor Tachev
Posted on: 16 Mar 2021 12:48

Hi,

Due to lack of recent activity and interest we are declining this request. 

 

Regards,
Viktor Tachev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Alex Hajigeorgieva
Posted on: 20 Jan 2020 11:57

Hello, 

We are currently reviewing popular items and this one seems to have attracted a lot of votes, however there is not much of recent activity so we would like to check how relevant the request is considering that the array prototype features a lot of useful methods that can be used instead:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array

We would love to hear more about any shortfalls that you may anticipate when using the built-in methods as opposed to Kendo UI ones.

Llook forward to hearing back from you.

Kind Regards,
Alex Hajigeorgieva
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.
Imported User
Posted on: 23 Aug 2017 10:00
No to this. Just use lodash.
Imported User
Posted on: 26 Nov 2014 10:53
I think kendo should focus on getting a few more core problems fixed and let the likes of jslinq worry about this type of problem.
Benjamin
Posted on: 16 Jan 2014 10:09
I also use JSLINQ. You got all what you need in this library and even more
Jason
Posted on: 17 Nov 2013 20:15
why would you just use lodash, or underscore for this? Those libraries are already mature and super optimized (ok mostly just lodash)
Stacey
Posted on: 21 Sep 2013 18:33
I am currently working on this with JSLINQ, which you can see at jslinq.codeplex.com - it is a VERY thin library (only 187 lines!) and can be easily adopted to fit with Kendo's ObservableArray model.