@avromiRussell @moe
I faced the same issue in my app. I applied a small patch in the JavaScript code. Since both the parent page and the detail popup have the same component ID, I added a unique CSS class to the parent component, and it now works perfectly as I needed.
I hope this might helpfull.
TB.render('YOUR_COMPONENT_ID', function(data) {
if ((data.records === undefined || data.records.length === 0) && data.ele.hasClass('your-unique-class')) {
data.ele.css('display', 'none');
}
});