Hello, in a table, we would like to set the Background color of a column typed as Checkbox.
For example here we would like to grey out rows that are excluded:
The issue is that it seems that the Background color property is not available for column types containing a component eg. Dropdown, Datepicker, Radio button or Text input.
Don't think this is possible via the traditional background field in the column setting. What you could do tho is to add. this logic to your app javascript settings. Haven't tested it fully yet but something in the lines of:
window.addEventListener('load', function () {
setInterval(function(){
var checkboxes = window.document.getElementsByClassName('boolean-cell-true')
for(let i = 0; i <= checkboxes.length; i++){
if (checkboxes[i] == undefined) { continue; }
console.log(checkboxes[i])
checkboxes[i].parentElement.parentElement.style.background = '#ccc'
}
}, 1000);
} )() }}
The idea being that a) this needs to execute ONCE all tables have been loaded and then periodically checked to color new elements.
NOT TESTED, just thought that's a start, you'll need to work out the deets and fine-tune it a bit. E.g., which elements do you want to color and in which tables (each table has it's on attribute you can use)