goodOne and goodOnes will pass by setting schemaPopulated: ["goodOne", "goodOnes"], but the remaining two cannot be populated by limited implementation of requestPostPopulate function. The code in question is in lines 80-89, which only picks object items via bracket notation and not via some parser...
The reason why the current implementation can be insufficient is when if it were used with "Sortable Inputs" form component. Adding an attachment form item will end up with broken behaviour (this reflects badArrays case). For "badObject" this can be reflected in nested objects used for readability reasons...
Proposed modification
Expand the function to support other possible cases.
Reason for this idea
Current schemaPopulated only allows to pre-populate two specific schema definitions
example:
goodOne
andgoodOnes
will pass by settingschemaPopulated: ["goodOne", "goodOnes"]
, but the remaining two cannot be populated by limited implementation of requestPostPopulate function. The code in question is in lines 80-89, which only picks object items via bracket notation and not via some parser...The reason why the current implementation can be insufficient is when if it were used with "Sortable Inputs" form component. Adding an attachment form item will end up with broken behaviour (this reflects badArrays case). For "badObject" this can be reflected in nested objects used for readability reasons...
Proposed modification
Expand the function to support other possible cases.