INNER CODE UNIT · JavaScript
count
deepentropy/tvscreener · app/js/app.js:184
const count = this.state.selectedFields.filter(n => this.findField(n)?.interval).length;
this.elements.fieldsIntervalGroup.hidden = this.state.selectAll || count === 0;
this.elements.fieldsIntervalHint.textContent = `Applies to ${count} of ${total} columns`;
},
/**
* Show a timeframe select only when the field supports it; reset it otherwise
* @returns {boolean} true when the field supports a timeframe
*/
syncIntervalSelect(select, field) {
const supported = !!field?.interval;
select.hidden = !supported;
if (!supported) select.value = '';
return supported;
},
/**
* Initialize the application