eclipsesource / eclipsesource/jsonforms

Angular - Issue with category element

Open
#2,343 1 comment 0 reactions 0 assignees View on GitHub
angular bug
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

### Describe the bug

I’m encountering an issue with the category element.
At the first time, when i click “add element” on the second tab, i am redirect to the first tab.
Why does this behavior occur ? All subsequent clicks on “add” after the first one function as anticipated. I’m using Angular 16 with jsonForms 3.2.1.
Seems to occur also with jsonForms 3.3.0.

```
schema = {
type: "object",
properties: {
parc: {
type: "array",
items: {
type: "object",
properties: {
id: {
type: "string",
},
},
},
},
},
};

uischema = {
type: "VerticalLayout",
elements: [
{
type: "Categorization",
elements: [
{
type: "Category",
label: "A1",
elements: [
{
type: "Control",
scope: "#/properties/parc",
options: {
detail: {
type: "VerticalLayout",
elements: [
{
type: "HorizontalLayout",
elements: [
{
type: "Control",
scope: "#/properties/id",
},
],
},
],
},
},
},
],
},
{
type: "Category",
label: "A2",
elements: [
{
type: "Control",
scope: "#/properties/parc",
options: {
detail: {
type: "VerticalLayout",
elements: [
{
type: "HorizontalLayout",
elements: [
{
type: "Control",
scope: "#/properties/id",
},
],
},
],
},
},
},
],
},
],
},
],
};

data = "{}";

```

### Expected behavior

When click on "add" in the 2nd tab, new element must be added and we must stay on the 2nd tab.

### Steps to reproduce the issue

1. Go to '2nd tab'
2. Click on 'add'
3. error : add ok but redirect to 1st tab

### Screenshots

_No response_

### Which Version of JSON Forms are you using?

v3.3.0

### Framework

Angular

### RendererSet

Material

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.