We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have been facing this bug, if i give a stand-alone filter like this
this.source.setFilter([ { field: 'amount', search: dateSearch, filter: (value, dateSearch)=>{ return new Date(value) >= dateSearch; } ], true, true)
this.source.setFilter([
{
field: 'amount',
search: dateSearch,
filter: (value, dateSearch)=>{
return new Date(value) >= dateSearch;
}
], true, true)
always return's empty (No Data Found) in the grid, after deep debugging found the root cause in the file,
ng2-smart-table/src/ng2-smart-table/components/filter/filter-default.ts
onFilter(query: string) { this.source.addFilter({ field: this.column.id, search: query, filter: this.column.getFilterFunction(), }); }
onFilter(query: string) {
this.source.addFilter({
field: this.column.id,
search: query,
});
this particular line returns the filter from the filterFunction in the DataModel which we define to map the data.
which is not defined so my custom function is not executing, instead it runs the normal search and return's zero elements the data Array, saying
"No Data Found"
in the front-end.
so as a workaround, I have set the filter function this in the DataModel itself.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have been facing this bug,
if i give a stand-alone filter like this
this.source.setFilter([
{
field: 'amount',
search: dateSearch,
filter: (value, dateSearch)=>{
return new Date(value) >= dateSearch;
}
], true, true)
always return's empty (No Data Found) in the grid,
after deep debugging found the root cause in the file,
ng2-smart-table/src/ng2-smart-table/components/filter/filter-default.ts
onFilter(query: string) {
this.source.addFilter({
field: this.column.id,
search: query,
filter: this.column.getFilterFunction(),
});
}
this particular line
returns the filter from the filterFunction in the DataModel which we define to map the data.
which is not defined so my custom function is not executing, instead it runs the normal search and return's zero elements the data Array, saying
"No Data Found"
in the front-end.
so as a workaround, I have set the filter function this in the DataModel itself.
The text was updated successfully, but these errors were encountered: