Closed heath-freenome closed 2 years ago
Hi, is there any time estimation when the new major will be released at least with alpha flag? Thnx!
No promises, but best guess is beta in mid-August
@heath-freenome sounds great, is mid-august still a reasonable possibility for v5?
@heath-freenome sounds great, is mid-august still a reasonable possibility for v5?
I'm shooting for releasing 5.0.0-beta.1
before the end of the month. Just wrapping up the documentation and a few small fixes
@heath-freenome awesome - sounds great! Thanks!
congratulation on the release. I'm getting the following error when installing 5.0.0-beta.2: Module not found: Can't resolve '@rjsf/core/dist/components/fields/ArrayField' Apparently, the typescript types are generated but no js files
Can you give me an expanded context on where you are seeing this error (in other words what is trying to import from that directory location)? All of the source code was rolled up into the base directory .js files... The `.d.ts` files weren't rolled up, but I'm leaning towards doing that as well in the beta.3 release
u give me an expanded context on where you are seeing this error (in other words what is trying to import from that directory location)? All of the source code was rolled up into the b
Sounds good. I was getting the error when trying to import ArrayField.
import ArrayField from '@rjsf/core/dist/components/fields/ArrayField';
What are you hoping to do by importing ArrayField
? Are you trying to override it or something?
What are you hoping to do by importing
ArrayField
? Are you trying to override it or something?
Yes. I have a use case where I override ArrayField when needed and just mount ArrayField when not needed. I think the component folder needs to be exposed. UISchema is great but there are use cases where we may need more control.
Yes. I have a use case where I override ArrayField when needed and just mount ArrayField when not needed. I think the component folder needs to be exposed. UISchema is great but there are use cases where we may need more control.
Can you explain your use case? Several more components of ArrayField
were exposed in the v5 beta as templates. Maybe your use case has been simplified by those changes?
Yes. I have a use case where I override ArrayField when needed and just mount ArrayField when not needed. I think the component folder needs to be exposed. UISchema is great but there are use cases where we may need more control.
Can you explain your use case? Several more components of
ArrayField
were exposed in the v5 beta as templates. Maybe your use case has been simplified by those changes?
So I have some properties that are of type array but I want to render/edit them in a text editor (monaco-editor) component. This requires giving full control of the array editing to the component that renders the Monaco editor. It seems to me that the ArrayField has some abstractions that are not needed in this case and can create problems. The array field assumes that each item will be rendered in a list but in this case, the text editor will just handle it differently. The only thing that the editor needs is to the get an array, and pass the array back. For this use case, I have to override ArrayField when the array property requires a text editor and use ArrayField with it is needed.
Is there a way to override ArrayField and still be able to access the original ArrayField without an import
?
Same question for templates?
You could try calling getDefaultRegistry()
and access fields.ArrayField
. The same would also work for the templates
.
const defaultRegistry = getDefaultRegistry();
const { ArrayField } = defaultRegistry.fields;
@kikonejacob In 5.0.0-beta.7 we added a new field called ArraySchemaField
(defaulting to SchemaField
) which lets you override the way an array item children
is rendered. This is the children
prop passed to the ArrayFieldItemTemplate
. Now in your specific use case you can override just that ArraySchemaField
to modify the name before passing it down to the SchemaField
in a manner similar to how you would have accessed the ArrayField
itself. Hopefully that simplifies your use case alot
@kikonejacob In 5.0.0-beta.7 we added a new field called
ArraySchemaField
(defaulting toSchemaField
) which lets you override the way an array itemchildren
is rendered. This is thechildren
prop passed to theArrayFieldItemTemplate
. Now in your specific use case you can override just thatArraySchemaField
to modify the name before passing it down to theSchemaField
in a manner similar to how you would have accessed theArrayField
itself. Hopefully that simplifies your use case alot
Thanks. I. will try it out
Here is the 5.x migration guide
Any and all feedback/issues are appreciated