Currently it only accepts querySelectorAll for getting the base objects. However we read configuration PER element and instantiate it accordingly (some have search, some not etc). It should accept: NodeList and HTMLElement.
Should be solved with something like this:
let originalSelects = [];
if(selector instanceof NodeList) originalSelects = selector;
elseif(selector instanceof HTMLElement) originalSelects = [selector];
elseif(typeof selector === 'string' || selector instanceof String)originalSelects = document.querySelectorAll(selector);
else throw new Error('Parameter for select must be... blabla');
Currently it only accepts querySelectorAll for getting the base objects. However we read configuration PER element and instantiate it accordingly (some have search, some not etc). It should accept: NodeList and HTMLElement.
Should be solved with something like this: