Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
this[temp + 'GridData'] = _.clone(this[temp + 'FilterArray']);
if (getTerm !== null && getTerm !== '') {
for (let i = 0; i < this[temp + 'GridData'].length; i++) {
if (this[temp + 'GridData'][i].Name.toLowerCase().indexOf(getTerm.toLowerCase()) !== -1) {
tempArray.push(this[temp + 'GridData'][i]);
}
if (this.isByChain && this[temp + 'GridData'][i]['PropertyName']) {
if (this[temp + 'GridData'][i]['PropertyName'].toLowerCase().indexOf(getTerm.toLowerCase()) !== -1) {
tempArray.push(this[temp + 'GridData'][i]);
}
}
}
this[temp + 'GridData'] = [];
setTimeout(() => {
this[temp + 'GridData'] = _.clone(tempArray);
}, 0);
} else {
this[temp + 'GridData'] = [];
setTimeout(() => {
this[temp + 'GridData'] = _.clone(this[temp + 'FilterArray']);
}, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.