eclipsesource / eclipsesource/jsonforms

Use custom data field instead of id

Open
#2,529 0 comments 1 reaction 0 assignees View on GitHub
core
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

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

At the moment we generate a unique global id per control based on its UI Schema path.
It must be unique because we assign it to the `id` HTML field which should be unique over the document.

However this brings with it some issues, see for example
- https://github.com/eclipsesource/jsonforms/issues/2519
- https://github.com/eclipsesource/jsonforms/pull/2383

### Describe the solution you'd like

There is no actual need for us to use the `id` field for this information. Instead we should just use a `data` HTML field without making the paths unique.

The data field could still be used for CSS, programmatic access etc. To make them unique, users then should prefix their forms, e.g. setting a different attribute on each of them.

### Describe alternatives you've considered

Keep the current state but improve the id handling regarding performance, lifetime etc.

### Package

Core

### 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.