javascript - Magento 2 call custom library in select.html -
i need call custom library select. have issue calling library on knockout files. particularly select being rendered file magento_ui/templates/form/element/select.html have tried found online had no luck. tried extended select.js new function , call on afterrender in file, tried usin x-magento-init, , on.
i need this select: $('select').select2();
can provide concrete , precise solution problem?
thanks!
to answer own question. issue when add call custom library in select.js there no jquery in define, needed add jquery. after getting error part return abstract.extend it's not jquery function. after adding 'ko' define before jquery able write new function called inside afterrender method of ui module.
Comments
Post a Comment