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

Dynamic header generation for array items #149

Open
ErikKoinberg opened this issue Feb 13, 2024 · 2 comments
Open

Dynamic header generation for array items #149

ErikKoinberg opened this issue Feb 13, 2024 · 2 comments

Comments

@ErikKoinberg
Copy link

It would be nice to have an option to generate dynamic headers when adding new items to an array. Perhaps a property called objectName or something like that is needed. For an object name "Book", it would be cool to get subheaders for the items like Book 1, Book 2 etc.

@bhch
Copy link
Owner

bhch commented Feb 14, 2024

Any ideas how this can be implemented?

Only way I can think of is to execute a JS function every time a new item is added and that function will return a new header?

@ErikKoinberg
Copy link
Author

ErikKoinberg commented Feb 14, 2024

Yes, I agree. The function will have to look at the schema for what the object type name is as well as how many instances there currently are in the data. With reordering or even duplications, this gets even trickier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants