mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 21:18:16 -06:00
Add clear button
This commit is contained in:
parent
93ad822b77
commit
1400065216
BIN
netbox/project-static/dist/netbox.js
vendored
BIN
netbox/project-static/dist/netbox.js
vendored
Binary file not shown.
BIN
netbox/project-static/dist/netbox.js.map
vendored
BIN
netbox/project-static/dist/netbox.js.map
vendored
Binary file not shown.
@ -5,7 +5,9 @@ import TomSelect from 'tom-select';
|
|||||||
function initStaticSelects(): void {
|
function initStaticSelects(): void {
|
||||||
|
|
||||||
for (const select of getElements<HTMLSelectElement>('select:not(.api-select):not(.color-select)')) {
|
for (const select of getElements<HTMLSelectElement>('select:not(.api-select):not(.color-select)')) {
|
||||||
new TomSelect(select, {});
|
new TomSelect(select, {
|
||||||
|
plugins: ['clear_button']
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -15,6 +17,7 @@ function initDynamicSelects(): void {
|
|||||||
for (const select of getElements<HTMLSelectElement>('select.api-select')) {
|
for (const select of getElements<HTMLSelectElement>('select.api-select')) {
|
||||||
const api_url = select.getAttribute('data-url') as string;
|
const api_url = select.getAttribute('data-url') as string;
|
||||||
new TomSelect(select, {
|
new TomSelect(select, {
|
||||||
|
plugins: ['clear_button'],
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
labelField: 'display',
|
labelField: 'display',
|
||||||
searchField: ['name'],
|
searchField: ['name'],
|
||||||
|
Loading…
Reference in New Issue
Block a user