Hide Component based on "no records" in table

Greetings Tada Community-

I would like to hide a component when a table doesn’t have any records showing. I attempted to work with some of the previous posts with some javascript but can’t get anything to work.

Any ideas what the JS would be?

Thanks in advance,
Adam

1 Like

I’m using this successfully.

TB.render(‘component_XX’, function(data) {
if (data.records === undefined || data.records.length === 0) {
data.ele.css(‘display’,‘none’)
}
});

2 Likes

Many thanks for the comment @mdykstra. I have tried this however, it does not work when the table is filtered. My apologies, I was not clearer in my initial posting. I would like to hide the component when filtering of the table is on (e.g., only show notifications when status is active).

Thus, is there JS that can hide the component when the table is filtered and no records are showing due to the filtered results?

Thanks,
Adam

1 Like

I want to hide a filtered list component

1 Like