I am trying to implement selectize.js inside my project with webpack and typescript.
First I installed selectize.js and related types:
yarn add @selectize/selectize
yarn add @types/select2
In my code I inserted this:
require("selectize")();
jQuery(function($){
$(document).ready(function(){
$('.classic-select').selectize();
});
});
The code compiles correctly but when I go to run it in console I get this error and I don't understand what it refers to:
Cannot read properties of undefined (reading '0')
Can you help me solve this problem?
Thanks in advance Danilo