mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-14 08:37:03 +02:00
cleanup comments
This commit is contained in:
parent
7d2c7a593e
commit
a6b9d79fad
1 changed files with 0 additions and 12 deletions
|
@ -2044,17 +2044,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
// Use a MutationObserver to watch for changes in the dropdown list
|
// Use a MutationObserver to watch for changes in the dropdown list
|
||||||
const dropdownList = comboBox.querySelector(`#${input.id}--list`);
|
const dropdownList = comboBox.querySelector(`#${input.id}--list`);
|
||||||
// TODO: customize blank value
|
|
||||||
// const isSuborgComboBox = comboBox.querySelector('#id_sub_organization--list');
|
|
||||||
const observer = new MutationObserver(function(mutations) {
|
const observer = new MutationObserver(function(mutations) {
|
||||||
mutations.forEach(function(mutation) {
|
mutations.forEach(function(mutation) {
|
||||||
if (mutation.type === "childList") {
|
if (mutation.type === "childList") {
|
||||||
// TODO: customize blank value
|
|
||||||
// if (isSuborgComboBox) {
|
|
||||||
// addBlankOption(clearInputButton, dropdownList, initialValue, 'No suborganization');
|
|
||||||
// } else {
|
|
||||||
// addBlankOption(clearInputButton, dropdownList, initialValue);
|
|
||||||
// }
|
|
||||||
addBlankOption(clearInputButton, dropdownList, initialValue);
|
addBlankOption(clearInputButton, dropdownList, initialValue);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2110,8 +2102,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: customize blank value
|
|
||||||
// function addBlankOption(clearInputButton, dropdownList, initialValue, customBlank) {
|
|
||||||
function addBlankOption(clearInputButton, dropdownList, initialValue) {
|
function addBlankOption(clearInputButton, dropdownList, initialValue) {
|
||||||
if (dropdownList && !dropdownList.querySelector('[data-value=""]') && !isTyping) {
|
if (dropdownList && !dropdownList.querySelector('[data-value=""]') && !isTyping) {
|
||||||
const blankOption = document.createElement("li");
|
const blankOption = document.createElement("li");
|
||||||
|
@ -2121,8 +2111,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
if (!initialValue){
|
if (!initialValue){
|
||||||
blankOption.classList.add("usa-combo-box__list-option--selected")
|
blankOption.classList.add("usa-combo-box__list-option--selected")
|
||||||
}
|
}
|
||||||
// TODO: customize blank value
|
|
||||||
// customBlank ? blankOption.textContent = customBlank : blankOption.textContent = "---------";
|
|
||||||
blankOption.textContent = "⎯";
|
blankOption.textContent = "⎯";
|
||||||
|
|
||||||
dropdownList.insertBefore(blankOption, dropdownList.firstChild);
|
dropdownList.insertBefore(blankOption, dropdownList.firstChild);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue