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 Choices = require('choices.js')
|
||||||
const $ = require('jquery')
|
|
||||||
|
|
||||||
module.exports = function () {
|
module.exports = () => {
|
||||||
$('*[data-jschoice]').each(function (key, item) {
|
document.querySelectorAll('*[data-jschoice]').forEach((item) => {
|
||||||
return new Choices(item)
|
return new Choices(item, {
|
||||||
|
searchFields: ['label'],
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue