Customize OverviewEngine from a binding inside a FormEngine

Hello,
I want to customize the Overview that results from a binding inside a Form.
I want to add a “Edit” button behind each row. As it is not possible to do that in the SME, I want to do it in the code.
But how can I achieve that?
Would be great if the solution also allows me to get the date in the row. So I can only show the Edit button in certain conditions.

My binding in the Form:

The OverviewModel for the binding:

My Code (In Order to get the binding to work, I had to add RelationshipFormModelMap to the formModelMap):

...

const formModelMap: FormModelMap = {
	...DefaultFormModelMap,
	...RelationshipFormModelMap
};

...

<FormEngineViews.FormEngine {...props} formModelMap={formModelMap}/>

The current Form:

Hi Tobias,
sorry that nobody answered earlier.

Unfortunately, the official statement is, that the Releationship Engine currently doesn’t support customization.

If you can afford tinkering around, there are some rudimentary, untested and unsupported code structures, that allow providing custom Relationship UI Components. You might be able to create a custom TableList component, that has your desired custom row actions.
But again, they are not tested, not guaranteed to work and might not be usable comfortably.

I can only give you some starting points for exploring a possible solution:

Instead of using the RelationshipFormModelMap directly, there is also a factory function “createRelationshipFormModelMap” that supports providing a componentProvider.
And via this componentProvider it should be possible to provide a custom Relationship UI Component.

Maybe you even find a mechanism to only use the custom component in the needed cases, and the default component otherwise. Or you use differently customized Form Engine Views for that.

To create a custom component, you should have a look into the existing built-in components, e.g. TableList.tsx in the relationship engine repo. I guess, you need to copy some code.

And since the built-in components internally use the overview engine, maybe you can achieve what you want via standard overview engine customization.

Greetings
Conrad

Hello @anon25596343 , I am a member of the Discourse team. I can see that there was a new response to your question on the Topic of the discussion. Do you find it helpful, or should the question remain open?

Thanks ahead for your feedback and have a nice rest of the day!

Hello,
sorry i forgot to answer.
We chose to create a custom TableList component and so far it seems to work.
Thank you :slight_smile: