|
|
@@ -1,7 +1,7 @@
|
|
|
import { TomOption } from 'tom-select/src/types';
|
|
|
import TomSelect from 'tom-select';
|
|
|
import { escape_html } from 'tom-select/src/utils';
|
|
|
-import { config } from './config';
|
|
|
+import { getPlugins } from './config';
|
|
|
import { getElements } from '../util';
|
|
|
|
|
|
// Initialize <select> elements with statically-defined options
|
|
|
@@ -10,7 +10,7 @@ export function initStaticSelects(): void {
|
|
|
'select:not(.tomselected):not(.no-ts):not([size]):not(.api-select):not(.color-select)',
|
|
|
)) {
|
|
|
new TomSelect(select, {
|
|
|
- ...config,
|
|
|
+ ...getPlugins(select),
|
|
|
maxOptions: undefined,
|
|
|
});
|
|
|
}
|
|
|
@@ -26,7 +26,7 @@ export function initColorSelects(): void {
|
|
|
|
|
|
for (const select of getElements<HTMLSelectElement>('select.color-select:not(.tomselected)')) {
|
|
|
new TomSelect(select, {
|
|
|
- ...config,
|
|
|
+ ...getPlugins(select),
|
|
|
maxOptions: undefined,
|
|
|
render: {
|
|
|
option: renderColor,
|