Closed adamhowse closed 4 years ago
Correct, you can't use the partial technique in plain old addFields because it has no access to self, this needs addressing in the docs. In 3.0 this issue will go away for... well, several reasons, including a completely new admin UI... but also because self
can be made available when configuring fields without as much work.
Where in the docs is the confusion coming from?
It's coming from this page (following the example code will result in the error, unless using the fix I posted above): https://docs.apostrophecms.org/advanced-topics/advanced-pieces-topics/adding-columns.html
I'll put it on my list for "soon", but if you would be willing to submit a PR to the docs we'd really appreciate it.
Following the example results in the application crashing to the console with this error:
Caused by:
return self.partial('manageUpdatedAt.html', { value: value });
I can however get it working by wrapping it in this, which is not consistent with how it should work according to the docs: