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
radios's radiosOptions is mandatory but flexible, and checklist is optional but strict.
While checklist support values as an array of string or an array of objects, radios only support the object format if radiosOptions is defined.
If you forget to add radiosOptions:
TypeError: this.schema.radiosOptions is undefined
What should be going on here in my opinion:
both radios and checklist should take simple array or array of objects as values (name for display and value for internal/model value)
both radios and checklist should have options (radiosOptions and checklistOptions) to define the name of each key used by the object
Also when using the object the documentation say that it should save only the id in the model, but it save everything:
// what it does"checklistlistbox":
[{"name": "Javascript","value": "Javascript-123"}]// instead of what the doc say it should do"checklistlistbox": ["Javascript-123"]
None of this is very bad by itself, but I think core fields should be more coherent in their options and functionalities. It will help users and it will help us making unit test without headaches.
So what should be the basic behavior of these kind of fields ? ***Options mandatory to use array of object ? Basic array and array of objects (with name and value) available, and only use ***Options to customize the name of keys ?
If you have found other small problems like those, please leave a comment !
We should fix them before the v2.0.0
The text was updated successfully, but these errors were encountered:
I think both of them should work with basic array & object arrays. And should create a checklistOptions for checklist that we can set the name of keys.
I didn't had the time to check all the documentation. Some example may need an update for the v2.
From the question we got in the issues, I think we need more details about the visible/disable function parameters (#149), how to use VFG without webpack (#148), how to use the default value (#147) and how to translate the error messages (#134).
Maybe the documentation need a FAQ section ?
radios
'sradiosOptions
is mandatory but flexible, andchecklist
is optional but strict.While
checklist
supportvalues
as an array of string or an array of objects,radios
only support the object format ifradiosOptions
is defined.If you forget to add
radiosOptions
:What should be going on here in my opinion:
radios
andchecklist
should take simple array or array of objects asvalues
(name
for display andvalue
for internal/model value)radios
andchecklist
should have options (radiosOptions
andchecklistOptions
) to define the name of each key used by the objectAlso when using the object the documentation say that it should save only the id in the model, but it save everything:
None of this is very bad by itself, but I think core fields should be more coherent in their options and functionalities. It will help users and it will help us making unit test without headaches.
So what should be the basic behavior of these kind of fields ?
***Options
mandatory to use array of object ? Basic array and array of objects (withname
andvalue
) available, and only use***Options
to customize the name of keys ?If you have found other small problems like those, please leave a comment !
We should fix them before the v2.0.0
The text was updated successfully, but these errors were encountered: