-
Notifications
You must be signed in to change notification settings - Fork 351
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
Filtering not working #258
Comments
Are you sure you've implemented actual data filtering on client or server side? |
This is my configuration:
The "basic scenario" demo does not show anything special that would be different from my code. |
I checked that the event handler for keypress works for the enter key. The grid.search() gets called (however with 'filter' being undefined). From reading the docs: default filtering should work out of the box without custom filtering code, correct? |
Nope, the data filtering logic is on the developer shoulders for the sake of flexibility and simplicity. Please see the following ticket: #32. |
loadData: function (filter) {
criteria = filter;
var data = $.Deferred();
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
url: "/fapplications",
dataType: "json"
}).done(function(response){
var res = [];
if(criteria.Name !== "")
{
response.forEach(function(element) {
if(element.Name.indexOf(criteria.Name) > -1){
res.push(element);
response = res;
}
}, this);
}
else res = response;
if(criteria.Title !== "")
{
res= [];
response.forEach(function(element) {
if(element.Title.indexOf(criteria.Title) > -1)
res.push(element);
}, this);
}
else res = response;
data.resolve(res);
});
return data.promise();
}, |
My Json result does not let me do "IndexOf". Any solution in my case? |
I've integrated jsgrid 1.4.1 into the Plone CMS with filtering enabled. However the filtering does not work (keypress events are possibly eaten or ignored somewhere, somehow)....how can I track this done.
See http://public.zopyx.com/filtering.mp4
The text was updated successfully, but these errors were encountered: