Open pooja-mane opened 7 years ago
For a filtering, you need exact data in JSON and HTML inputs. One thing you can do is add beforeAddRecords
callback to process data to remove spaces or unwanted things.
Right now I have write a code inFilterJS
function where we pass a json data, criteria.
It works for all criteria. is it a right way?
If you are changing collected data from HTML then better you can render with a correct format. Use beforeAddRecords
only for JSON data.
I have to remove white spaces from only JSON data. I will try beforeAddRecords
for that. Thank you...
I try to filter my view from checkbox with options as: This is skill list
Project Management
Developer
Tester
Fast Learner
I have used this in coffee script code FJS = FilterJS(user_data.data, '#result-set', { template: '#result-row', criterias: [ {field: 'search_skill_list.$subset', ele: '#skills input:checkbox, #moreSkills input:checkbox'} ]});
when I want to filter out
Fast Learner
from JSON data it won't. JSON data contains that word,but it has a space as " Fast Learner" so it wont match with current data. It searches for exact word matching.I tried for other examples also it gives same result as "no data is found".
Do you have any idea for this?