Expected: once I press the button, the tags for the topic are set to my-tag (works), which triggers a re-render of the button, and disables it.
Expected: once I add the tag manually, the button is disabled
Reality: the re-render is not triggered in either scenario.
The button is correctly disabled/enabled on page refresh.
Having a computed property depending on topic.tags will cause it to be invalidated when the array itself is replaced. But it wonāt cause invalidation when items are added/removed from the array.
So I think you probably want topic.tags.@each (docs).
In general weāre trying to move away from computed properties, and towards native-getters/autotracking. I guess weāll have to modernize the topic-footer-buttons API at some point to support that
I also tried this.topic.notifyPropertyChange("tags");
and I even went desperate and tried to manipulate other properties (like this.topic.title = this.topic.title + "!" and including topic.title in dependentKeys). That does not work either. Using this.topic.set... doesnāt work as well.
Interestingly, if I copy/paste your example from the OP and run locally, it seems to work perfectly:
Are there any other themes/plugins which could be interfering? Or perhaps something different about your ārealā code, compared to the minimal example in the OP?
My āminimalā code in the OP is my ārealā code at the moment. Iām going to move it to a completely clean install and see if that changes anything.
EDIT yes it does work on a clean install
Iāll unlist this topic so I donāt have to live with the shame
Iāll update you when I find out what was causing this.