-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow specifying a path to a custom js function #267
Conversation
README.md
Outdated
|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|---------------------------| | ||
| link-to-url | Renders a link to the given url with {value} replace by the value of the table. Other values of the same row can be accessed by their column header (e.g. {age} for a column named age). | | | | ||
| custom | Applies the given js function to render column content. The parameters of the function are similar to the ones defined [here](https://bootstrap-table.com/docs/api/column-options/#formatter) | | | | ||
| custom-path | Allows to specify a path to a file that contains a js function similar to custom. | | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should say something about the naming of the function and in general the allowed contents of the file here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the function shouldn't matter (added that to the docs) and also pointed to the example of our example report.
🤖 I have created a release \*beep\* \*boop\* --- ## [2.9.0](https://www.github.com/datavzrd/datavzrd/compare/v2.8.1...v2.9.0) (2022-11-17) ### Features * Allow specifying a path to a custom js function ([#267](https://www.github.com/datavzrd/datavzrd/issues/267)) ([1eb1453](https://www.github.com/datavzrd/datavzrd/commit/1eb145338b551285926ff8449ebd90664688f2d3)) ### Bug Fixes * Fix error when rendering empty multi header files ([#268](https://www.github.com/datavzrd/datavzrd/issues/268)) ([9c2b464](https://www.github.com/datavzrd/datavzrd/commit/9c2b4649cc6ab170a048d7a7154625b28f5be309)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR allows the user to write their custom js function in a separate file instead of inside the config.yaml. This cleans up the config when having long custom functions as well as making it possible for the user to have full IDE support when writing the actual javascript.