set searchFields option on jschoice manager
This commit is contained in:
parent
93a1e7811d
commit
6736f94eea
|
@ -1,8 +1,9 @@
|
|||
const Choices = require('choices.js')
|
||||
const $ = require('jquery')
|
||||
|
||||
module.exports = function () {
|
||||
$('*[data-jschoice]').each(function (key, item) {
|
||||
return new Choices(item)
|
||||
module.exports = () => {
|
||||
document.querySelectorAll('*[data-jschoice]').forEach((item) => {
|
||||
return new Choices(item, {
|
||||
searchFields: ['label'],
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue