mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
fix: show free text for 'other' in multi-select
Resolves #104 Should resolve #101 See #75
This commit is contained in:
@@ -62,7 +62,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setFreeTextState(select, freeTextField) {
|
function setFreeTextState(select, freeTextField) {
|
||||||
if (select.selectedOptions[0].text.toLowerCase().startsWith('other')) {
|
var other_selected = false;
|
||||||
|
for (var i = 0; i < select.selectedOptions.length; i++) {
|
||||||
|
if (select.selectedOptions[i].text.toLowerCase().startsWith('other')) {
|
||||||
|
other_selected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (other_selected) {
|
||||||
freeTextField.show();
|
freeTextField.show();
|
||||||
} else {
|
} else {
|
||||||
freeTextField.hide();
|
freeTextField.hide();
|
||||||
|
|||||||
Reference in New Issue
Block a user