Renamed the hasAnyMatched variable to isAnyMatched in the JavaScript #filterOptions method of the BaseAccountSelector, RecurringAccountSelector, and OriginalLineItemSelector classes.
This commit is contained in:
parent
a9afc385e9
commit
7459afd63a
@ -296,16 +296,16 @@ class BaseAccountSelector {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#filterOptions() {
|
#filterOptions() {
|
||||||
let hasAnyMatched = false;
|
let isAnyMatched = false;
|
||||||
for (const option of this.#options) {
|
for (const option of this.#options) {
|
||||||
if (option.isMatched(this.#query.value)) {
|
if (option.isMatched(this.#query.value)) {
|
||||||
option.setShown(true);
|
option.setShown(true);
|
||||||
hasAnyMatched = true;
|
isAnyMatched = true;
|
||||||
} else {
|
} else {
|
||||||
option.setShown(false);
|
option.setShown(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hasAnyMatched) {
|
if (!isAnyMatched) {
|
||||||
this.#optionList.classList.add("d-none");
|
this.#optionList.classList.add("d-none");
|
||||||
this.#queryNoResult.classList.remove("d-none");
|
this.#queryNoResult.classList.remove("d-none");
|
||||||
} else {
|
} else {
|
||||||
|
@ -898,16 +898,16 @@ class RecurringAccountSelector {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#filterOptions() {
|
#filterOptions() {
|
||||||
let hasAnyMatched = false;
|
let isAnyMatched = false;
|
||||||
for (const option of this.#options) {
|
for (const option of this.#options) {
|
||||||
if (option.isMatched(this.#query.value)) {
|
if (option.isMatched(this.#query.value)) {
|
||||||
option.setShown(true);
|
option.setShown(true);
|
||||||
hasAnyMatched = true;
|
isAnyMatched = true;
|
||||||
} else {
|
} else {
|
||||||
option.setShown(false);
|
option.setShown(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hasAnyMatched) {
|
if (!isAnyMatched) {
|
||||||
this.#optionList.classList.add("d-none");
|
this.#optionList.classList.add("d-none");
|
||||||
this.#queryNoResult.classList.remove("d-none");
|
this.#queryNoResult.classList.remove("d-none");
|
||||||
} else {
|
} else {
|
||||||
|
@ -155,16 +155,16 @@ class OriginalLineItemSelector {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#filterOptions() {
|
#filterOptions() {
|
||||||
let hasAnyMatched = false;
|
let isAnyMatched = false;
|
||||||
for (const option of this.#options) {
|
for (const option of this.#options) {
|
||||||
if (option.isMatched(this.#debitCredit, this.#currencyCode, this.#query.value)) {
|
if (option.isMatched(this.#debitCredit, this.#currencyCode, this.#query.value)) {
|
||||||
option.setShown(true);
|
option.setShown(true);
|
||||||
hasAnyMatched = true;
|
isAnyMatched = true;
|
||||||
} else {
|
} else {
|
||||||
option.setShown(false);
|
option.setShown(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hasAnyMatched) {
|
if (!isAnyMatched) {
|
||||||
this.#optionList.classList.add("d-none");
|
this.#optionList.classList.add("d-none");
|
||||||
this.#queryNoResult.classList.remove("d-none");
|
this.#queryNoResult.classList.remove("d-none");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user