Commit 942d9366 authored by Wikiki's avatar Wikiki

fix: options on attach method

parent 83457598
......@@ -46,16 +46,16 @@ export default class Tagify {
* @method
* @return {Array} Array of all TagsInput instances
*/
static attach(selector = 'input[type="tags"]') {
let tagsinputlInstances = new Array();
static attach(selector = 'input[type="tags"]', options = {}) {
let tagsinputsInstances = new Array();
const tagsinputs = document.querySelectorAll(selector);
[].forEach.call(tagsinputs, tagsinput => {
setTimeout(() => {
tagsinputlInstances.push(new Tagify(tagsinput));
tagsinputsInstances.push(new Tagify(tagsinput, options));
}, 100);
});
return tagsinputlInstances;
return tagsinputsInstances;
}
init() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment