Use an MD icon for the clear button

This commit is contained in:
Jeremy Stretch 2024-02-08 13:14:27 -05:00
parent 3fa5168ea8
commit 7f3c181d06
4 changed files with 10 additions and 11 deletions

Binary file not shown.

View File

@ -1,10 +1,9 @@
export const config = {
// Provides the "clear" button on the widget
plugins: {
'clear_button': {
'html': (data: Dict) => `<i class="mdi mdi-close-circle ${data.className}" title="${data.title}"></i>`
}
},
}
plugins: {
// Provides the "clear" button on the widget
clear_button: {
html: (data: Dict) =>
`<i class="mdi mdi-close-circle ${data.className}" title="${data.title}"></i>`,
},
},
};

View File

@ -1,7 +1,7 @@
import { TomOption } from 'tom-select/src/types';
import { escape_html } from 'tom-select/src/utils';
import { DynamicTomSelect } from './classes/dynamicTomSelect';
import { config } from './config'
import { config } from './config';
import { getElements } from '../util';
const VALUE_FIELD = 'id';

View File

@ -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 { config } from './config';
import { getElements } from '../util';
// Initialize <select> elements with statically-defined options