Hello everyone,
After a few years of developing some backend code in the sdk I am now ready to try and add the front-end to my module. I am just wondering how hard it is to add a new perspective component to the tree that is basically a pre-configured perspective table to get data more easily accessible to the client. If anyone has done this before an example would be greatly appreciated.
Regards,
The SDK examples have perspective components you can work with.
As far as custom components, you could also look at things like apexCharts module implementation for an example of a display component.
will go over that example i completely missed it in the sdk examples I probably should stop developing at 2am.
For the sake of it, I'll mention that this is generally an antipattern.
There's no mechanism in the API to provide "a component that already has bindings for X, Y, Z set up" on it, deliberately. Configuring bindings is a role for end users. The points of extensibility in the module SDK in Perspective (and Vision for that matter) are either:
- Providing new action or binding types, that can perform whatever other function
- Providing entirely new components.
Trying to create a "real" IA table component configured in just the right way is going to be fighting an uphill battle the whole way/probably impossible outright.
2 Likes
Took the words right out of my mouth.
Jarith, don't do this. Really.
Instead, consider providing expression functions or scripting functions that simplify the data processing for your expected use, to deliver to props.data
and props.columns
of the OOB table.
Thanks guys. I was wondering if maybe just providing a template in the exchange would be better than creating a new component. The scripting functions are already exposed so that makes the debate really easy.
1 Like