Dynamic field not updating when deleting entry in database?

I’m learning how to write plugins.
I want to display message with number to the user when he switches to another tab (i know, it may exist, but it’s for learning). So my plugin has 3 fields that user can fill:

  • dynamic number - here goes Bubble expression, eg. (1) Search for items :count or (2) RepeatingGroup A’s list of items:count etc
  • text on focus - easy
  • text on blur - easy

Example (1) Search for items :count
Now, all works almost fine: when user clicks another window or tab - “text on blur” is shown as page title, together with the dynamic number, eg. Messages: 4
When I add rows in the database (still tab/window is not in focus, i do it from editor or another page) - the number changes - Messages: 5, etc
But if now I delete item from database (through editor or another page) - text stays Messages: 5

Example (2) RepeatingGroup A’s list of items:count
However, above is not the case if the Dynamic number uses the items from the RepeatingGroup on the same page. Or even if it stays with (1) as expression: Search for items:count AND there is a RepeatingGroup using same data on the page (through a separate Search). In these cases all works as expected: when items are added - Dynamic number increases, when deleted - decreases.

Question: why? how to make it go down in the example (1)? Should I somehow receive any “item was deleted” event in my plugin?

OK, since I found no answer so far - easier question, to @emmanuel, or whoever can answer:

is it a bug or a feature, that some elements (eg. Text or Input) as well as user designed plugins containing dynamic data (eg. Search for thing:count) don’t update on the page, when change “delete entry” is made to the database, but are updated when change is “new entry”?

Since you can’t play on my database - you can see what I mean by doing test here:

  • open this page: https://obiwan.bubbleapps.io/version-test?debug_mode=true

  • open 2 (yes, two, not 2nd) tabs/windows with this page: https://obiwan.bubbleapps.io/version-test/charts?debug_mode=true

  • on both pages (index and charts) there is bottom part containing Text and Input field with a number

  • additionally, there is a test plugin changing title of the page when window focus is lost

  • now go to one of the Charts pages and add new topping with some slices

  • you should notice, that on other pages (index and 2nd chart page) Text and Input elements, as well as title, changed - they now contain old+1 value

  • now on the same chart page delete added element by clicking the X in the repeatinggroup.

  • on 2nd charts page all values are updated

  • but on the index page old values are kept all over

  • if you get back to one of charts pages and now add 1 or more new toppings - values will get updated everywhere, but once again - when you delete, only in one page they are lowered (hint: it works only, when RG is there)

I again ask the question from the beginning of this post:
is it a bug or a feature of Text, Input, other elements? or I’m doing something wrong?