this.afterRefresh() is not a function

Yes calling it as a function should be the expected usage.