I've been working on incorporating selectize.js into my project using webpack and typescript.
After installing selectize.js and the necessary types, I added the following to my code:
yarn add @selectize/selectize
yarn add @types/select2
Within my code, I included the following snippet:
require("selectize")();
jQuery(function($){
$(document).ready(function(){
$('.classic-select').selectize();
});
});
Although the code compiles without errors, when I try to run it in the console, I encounter the following error that I can't seem to figure out:
Cannot read properties of undefined (reading '0')
If anyone could provide assistance in solving this issue, I would greatly appreciate it.
Sincerely, Danilo