mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 02:09:03 +02:00
Automatically select the first option of part multi select.
This commit is contained in:
parent
e067dc80d5
commit
47584dd845
1 changed files with 5 additions and 0 deletions
|
@ -76,6 +76,11 @@ export default class extends DatatablesController {
|
|||
|
||||
tom_select.addOptions(json, false);
|
||||
|
||||
//Select first element if there is one (so category select is not empty)
|
||||
if(json.length > 0) {
|
||||
tom_select.setValue(json[0].value);
|
||||
}
|
||||
|
||||
select_element.nextElementSibling.classList.remove('d-none');
|
||||
|
||||
//$(select_element).selectpicker('show');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue