Hello, how can I add/remove items using arrayControl (JsonFormsArrayControl class)
Like in angular seed
I mean in code what method should I use?
Hello, how can I add/remove items using arrayControl (JsonFormsArrayControl class)
Like in angular seed
I mean in code what method should I use?
What you see in the seed is not the array control but the master-detail
.
If you would like to add Add/Remove buttons to the Angular table renderer then first you should add a custom table renderer to your code base (you can just copy the existing one). Then you overwrite ngOnInit
and weave in the dispatch functions, similar to the array-layout.renderer. Additionally you could also weave in the specialized mapStateToArrayControlProps
by overwriting mapToProps
if you want to.
Now you have utility function generators like addItem
and removeItems
available and can use them to add the UI you want.