working stream name match
This commit is contained in:
parent
ce6572b81b
commit
3f1ebfbac0
@ -124,6 +124,10 @@
|
|||||||
list: data
|
list: data
|
||||||
});
|
});
|
||||||
|
|
||||||
|
streamInput.addEventListener('awesomplete-selectcomplete', function(event) {
|
||||||
|
this.value = event.text.value;
|
||||||
|
});
|
||||||
|
|
||||||
{% if text_input_enabled %}
|
{% if text_input_enabled %}
|
||||||
const accountDetailsTextarea = document.getElementById('accountDetails');
|
const accountDetailsTextarea = document.getElementById('accountDetails');
|
||||||
if (accountDetailsTextarea) {
|
if (accountDetailsTextarea) {
|
||||||
@ -142,17 +146,9 @@
|
|||||||
document.getElementById('password').value = passwordLine.substring(5).trim();
|
document.getElementById('password').value = passwordLine.substring(5).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (awesomplete && streamName) {
|
if (streamName) {
|
||||||
const streamList = awesomplete.list;
|
|
||||||
// Find best match
|
|
||||||
const match = streamList.find(item => item.toLowerCase().includes(streamName.toLowerCase()));
|
|
||||||
if (match) {
|
|
||||||
streamInput.value = match;
|
|
||||||
} else {
|
|
||||||
streamInput.value = streamName;
|
|
||||||
}
|
|
||||||
} else if (streamName) {
|
|
||||||
streamInput.value = streamName;
|
streamInput.value = streamName;
|
||||||
|
awesomplete.evaluate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user