Created
December 22, 2020 04:12
-
-
Save ziterz/c63cca4f6cc219140fa00c6786f2756e to your computer and use it in GitHub Desktop.
filtering - [title]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// filtering - [title] | |
if (filter != '' && typeof filter !== 'undefined') { | |
let query = filter.title.split(',').map(function(item) { | |
return { | |
[Op.iLike]: '%' + item + '%' | |
} | |
}); | |
paramQuerySQL.where = { | |
title: { [Op.or]: query } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment