Default FormType data to mixed#499
Conversation
staabm
left a comment
There was a problem hiding this comment.
I have not much experience with these types.
feel free to merge if you guys know what you are doing :)
I think the goal here is to add a default in order to avoid forcing the user to type every existing generic Form ; especially because those generic are partially wrong (see #430) |
|
Yes So better set a default to mixed and not force them. But default to mixed make it easier, specially you not require accessing the data in lot of custom types. I even would consider it be bad practice outside of listener but thats only my personal opinion :). As mention there also be can data transformers which form component allow via Extension manipulate every type. |
The same form type can be used with an
objector if no data is set unstructured arrayarray<string, mixed>or a none compound simple typestring,bool, ...So the best default to not annoy here is set TData to mixed, still all existing can say they only accept specific data.
In most cases form types not accessing data in them so this mostly unused generic type. Only a few form types accessing data directly.