Allow to filter parameters by their (numeric) value

This commit is contained in:
Jan Böhmer 2022-09-08 00:04:53 +02:00
parent b56a970d5b
commit dd400ae70c
8 changed files with 288 additions and 23 deletions

View file

@ -13,8 +13,14 @@ export default class extends Controller {
*/
update()
{
const two_element_values = [
"BETWEEN",
'RANGE_IN_RANGE',
'RANGE_INTERSECT_RANGE'
];
for (const thingToHide of this.thingsToHideTargets) {
thingToHide.classList.toggle("d-none", this.operatorTarget.value !== "BETWEEN");
thingToHide.classList.toggle("d-none", !two_element_values.includes(this.operatorTarget.value));
}
}
}