Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I tried many different solutions but the thought of using $element.innerText never really occurred to me! Really nice! Despite the fact that the solution "feels" a little hacky, I still find it to be the best way to go. Will mark it as the correct answer. Thanks!
If I click on a checkbox in the Apples table, the badge in that table (to the right, the inverse one) needs to display 1. If I click on another checkbox, the badge needs to display 2. If I check a checkbox in the Oranges table, then that badge needs to display 1. So basically, the badge values needs to be reactive based on user interaction. I've added another image to show the desired effect.
We've been able to reproduce it in multiple (three, to be exact) sandbox environments. All independent from each other. Also, it's very clear that Salesforce is loading entirely different assets (css, js) in the background in comparison to the "Edit"-override (even the background image is changing).