Refactor room addition logic; streamline new room creation and sorting in settings template for improved clarity and functionality
This commit is contained in:
parent
3c9806bd34
commit
86a4e4d22f
2 changed files with 4 additions and 4 deletions
|
@ -139,8 +139,10 @@
|
|||
|
||||
if (name.trim()) {
|
||||
const newRoom = ComboBoxWidget.createOption(`${name}`, null);
|
||||
document.getElementById('room-list').appendChild(newRoom);
|
||||
ComboBoxWidget.sortOptions(document.getElementById('room-list'));
|
||||
const selectWidget = document.getElementById('room-list');
|
||||
|
||||
selectWidget.appendChild(newRoom);
|
||||
ComboBoxWidget.sortOptions(selectWidget);
|
||||
bootstrap.Modal.getInstance(modal).hide();
|
||||
} else {
|
||||
alert('Please enter a room name.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue