You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there and THX .... no a really big thx for this package.
I would like talking about adding component Widget that manage itself Array item string | number | ...
But keep the json-schema validate future data like `["foo", "bar"]. All this things without specified enum data cause :
They are too much (Dates)
They are not yet know maybe. (Async Data)
Actual behavior
Take this simple example :
I use this package to get an Array of string representing some dates : FlatPickr
so a simple schema will be :
But this will create a multiline DateField with (+) and (-) button... I'm not expected this. As you can see, even if i specified the uniqueItems property to true.
Expected behavior
I expected only one DateComponent where i can select multiple date Right ? Even if items props contain only the type props;
Personal Solution Found
So the only solution that i found is to Customize the ArrayField if enum property is empty and if uniqueItems is specified. It is maybe not the right way but i share for anyone get this issue:
It is the much cleaner way that i Found but maybe i wrong. But at this time it is working for my needs...
Question & Suggestion
Can we have a simplest way to handle this type of component in your code ?
Do you have a better solution for this request ?
And then, add it to the documentation to avoid frustation development... because this package is great. Ajv is fast & json-schema should be ( for me ) the must used verification for front & back end development.
The text was updated successfully, but these errors were encountered:
Prerequisites
Version
"react-jsonschema-form": "^1.0.3"
Description
Hey there and THX .... no a really big thx for this package.
I would like talking about adding component Widget that manage itself
Array
item string | number | ...But keep the json-schema validate future data like `["foo", "bar"]. All this things without specified enum data cause :
Actual behavior
Take this simple example :
I use this package to get an Array of string representing some dates :
FlatPickr
so a simple schema will be :
But this will create a multiline DateField with (+) and (-) button... I'm not expected this. As you can see, even if i specified the
uniqueItems
property totrue
.Expected behavior
I expected only one DateComponent where i can select multiple date Right ? Even if
items
props contain only thetype
props;Personal Solution Found
So the only solution that i found is to Customize the ArrayField if
enum
property is empty and ifuniqueItems
is specified. It is maybe not the right way but i share for anyone get this issue:It is the much cleaner way that i Found but maybe i wrong. But at this time it is working for my needs...
Question & Suggestion
Can we have a simplest way to handle this type of component in your code ?
Do you have a better solution for this request ?
And then, add it to the documentation to avoid frustation development... because this package is great. Ajv is fast & json-schema should be ( for me ) the must used verification for front & back end development.
The text was updated successfully, but these errors were encountered: