jsonforms icon indicating copy to clipboard operation
jsonforms copied to clipboard

Add "Add" and "Remove" actions to the Angular Table

Open sdirix opened this issue 4 years ago • 5 comments

Is your feature request related to a problem? Please describe.

At the moment the Angular Table is very basic. It would be great to add "Add" and "Remove" actions, similar to the Array Layout renderer.

Describe the solution you'd like

Add an "Add" button which is able to

  • create a new item instance (should also support primitives)
  • create the array if it not yet exists

Add a "Remove" button in each row which is able to

  • remove the corresponding entry

Describe alternatives you've considered

There could also be a remove button for the whole array which not only empties the array but removes it completely. Note that we don't have such a remove button yet in any other renderer set too.

Framework

Angular

RendererSet

Material

Additional context

No response

sdirix avatar Jul 09 '21 09:07 sdirix

@sdirix Following up here on https://jsonforms.discourse.group/t/array-not-rendering-add-button-is-missing/174/13

Thank you. What would be the alternate approach to resolve this issue?

bappctl avatar Sep 23 '21 17:09 bappctl

Following up here on https://jsonforms.discourse.group/t/array-not-rendering-add-button-is-missing/174/13 Same. What would be the alternate approach to resolve this issue? Any status updates on this? We desperately need this right now.

robertcbit avatar Nov 16 '21 17:11 robertcbit

There is no status update.

You have basically two options:

  • Implement a custom table renderer for arrays which includes support for these buttons
  • Use the non-table renderer for arrays. This can be done for example by specifying an inlined UI schema via the options.

Of course we would also look at a contribution adding "Add" and "Remove" to the existing table renderer.

sdirix avatar Nov 16 '21 19:11 sdirix

Hello friends I have created a custom table renderer that has the Add and Remove copied from the ArrayRenderer. Would like to contribute. Screenshot 2022-05-13 at 04 56 24

brunodubcosta avatar May 13 '22 03:05 brunodubcosta

I added somehting mentioned by @brunodubcosta it feels like table renderer should really support rather than creating custom renderer for this. https://github.com/eclipsesource/jsonforms/pull/2021

Tarjei400 avatar Sep 21 '22 16:09 Tarjei400