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
Passing ui options down to array items #4160
Comments
Hello, it was a problem updating the deep nested array and I think I can solve it with something like this. Is there a better way to update this value properly? With immer I got it's only readable
|
This is a very niche use-case. I cannot think of any feature in RJSF that would make this easier. I think your code is probably a safe way to do it, but it is hard for us to debug code you have written that is specific to your application. |
Thanks @nickgros , I'm making a workflow builder, and each node has it's own form, so I'm using RJSF to generate them easily (and the output data too). Now the idea is to show a preview of plain data on the node by leveraging on the RJSF with custom templates and widgets. And from the uiSchema I can define witch field or group of fields (even nested) will be displayed and will be a port in the node, this is why I needed to manipulate the props in runtime. At the end I could simplify the override of props using immer by adding
and then for example:
Thanks, this is a wonderful project |
Prerequisites
What theme are you using?
chakra-ui
What is your question?
Hello, I'm using custom templates to display only plain data and I would like to add a custom uiSchema option to count the total of items in a nested array, for example
In the ArrayFieldTemplate I'm trying adding an offset index for each group into the uiSchema options, but I think these options apply for all, independently if I set it for each group., for example:
After that all the items have the same latest index, and I would like to pass the totalItems from the previous group to the next one.
Thanks in advanced
The text was updated successfully, but these errors were encountered: