Skip to content
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

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

Closed
sdirix opened this issue Jul 9, 2021 · 5 comments · Fixed by #2021
Closed

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

sdirix opened this issue Jul 9, 2021 · 5 comments · Fixed by #2021

Comments

@sdirix
Copy link
Member

sdirix commented Jul 9, 2021

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

@bappctl
Copy link

bappctl commented Sep 23, 2021

@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?

@robertcbit
Copy link

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.

@sdirix
Copy link
Member Author

sdirix commented Nov 16, 2021

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.

@brunodubcosta
Copy link

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

Tarjei400 pushed a commit to t3chy0n/jsonforms that referenced this issue Sep 21, 2022
@Tarjei400
Copy link
Contributor

I added somehting mentioned by @brunodubcosta it feels like table renderer should really support rather than creating custom renderer for this. #2021

Tarjei400 pushed a commit to t3chy0n/jsonforms that referenced this issue Sep 21, 2022
lucas-koehler pushed a commit that referenced this issue Oct 21, 2022
* Added add and remove icons to angular material table renderer
* Added tests for adding and removing rows functionality

Fixes #1782

Co-authored-by: Adrian Jutrowski <[email protected]>
@lucas-koehler lucas-koehler modified the milestones: next, 3.x Oct 21, 2022
@sdirix sdirix modified the milestones: 3.x, 3.1 Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants