this.afterRefresh() is not a function

I hadn’t defined afterRefresh in the composer-editor tag parameters in the template file. I guess that is required.