<Form /> has runtime errors when `noDefault` is `true`
@ZenMasterJacob20011 ya está trabajando en esto.
Desde el 15/5/2024.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Formio version @formio/[email protected]
React version: 18.2.0
If noDefault in options is true, an error occurs after choose a file for a file component.
File.js:764 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'some')
at _callee$ (File.js:764:1)
at tryCatch (File.js:99:1)
at Generator.<anonymous> (File.js:99:1)
at Generator.next (File.js:99:1)
at asyncGeneratorStep (File.js:100:1)
at _next (File.js:101:1)
at File.js:101:1
at new Promise (<anonymous>)
at File.js:101:1
at File.js:926:1
_callee$ | @ | File.js:764
-- | -- | --
| tryCatch | @ | File.js:99
| (anonymous) | @ | File.js:99
| (anonymous) | @ | File.js:99
| asyncGeneratorStep | @ | File.js:100
| _next | @ | File.js:101
| (anonymous) | @ | File.js:101
| (anonymous) | @ | File.js:101
| (anonymous) | @ | File.js:926
| upload | @ | File.js:717
| (anonymous) | @ | File.js:465
| Promise.then (async) | |
| (anonymous) | @ | File.js:464
<Form
form={form_json}
onChange={onFormChange}
submission={submission_json}
options={{
noDefaults: true
}}
/>
form_json
{
"components": [
{
"label": "Upload",
"labelPosition": "top",
"description": "",
"tooltip": "",
"customClass": "",
"tabindex": "",
"hidden": false,
"hideLabel": false,
"autofocus": false,
"disabled": false,
"tableView": false,
"modalEdit": false,
"storage": "base64",
"dir": "",
"fileNameTemplate": "",
"image": false,
"uploadOnly": false,
"webcam": false,
"fileTypes": [
{
"label": "",
"value": ""
}
],
"filePattern": "*.heic,*.gif,*.jpg,*.jpeg,*.png,*.bmp,*.pdf,*.zip,*.ppt,*.pptx,*.doc,*.docx,*.xls,*.xlsx",
"fileMinSize": "0KB",
"fileMaxSize": "10MB",
"multiple": false,
"persistent": true,
"protected": false,
"dbIndex": false,
"encrypted": false,
"redrawOn": "",
"clearOnHide": true,
"customDefaultValue": "",
"calculateValue": "",
"calculateServer": false,
"allowCalculateOverride": false,
"validate": {
"required": false,
"customMessage": "",
"custom": "",
"customPrivate": false,
"json": "",
"strictDateValidation": false,
"multiple": false,
"unique": false
},
"errorLabel": "",
"errors": "",
"key": "file",
"tags": [],
"properties": [],
"conditional": {
"show": null,
"when": null,
"eq": "",
"json": ""
},
"customConditional": "",
"logic": [],
"attributes": [],
"overlay": {
"style": "",
"page": "",
"left": "",
"top": "",
"width": "",
"height": ""
},
"type": "file",
"imageSize": "200",
"input": true,
"placeholder": "",
"prefix": "",
"suffix": "",
"defaultValue": null,
"unique": false,
"refreshOn": "",
"dataGridLabel": false,
"widget": null,
"validateOn": "change",
"showCharCount": false,
"showWordCount": false,
"allowMultipleMasks": false,
"addons": [],
"privateDownload": false,
"id": "ecedeus"
}
]
}
- Lenguaje dominante
- TypeScript
- Estrellas
- 371
- Forks
- 309
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de formio/react
-
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
onChange `modified` property remains false when file component is updatedQuizá libre de nuevo @ZenMasterJacob20011 la tomó hace 293 días y no hay ningún pull request abierto. Abierto
-
FormBuilder onChange callback not triggered when options prop is providedQuizá libre de nuevo @Victoriya25 la tomó hace 335 días y no hay ningún pull request abierto. Abierto
-
FormBuilder with OnChange broke textareaQuizá libre de nuevo @lane-formio la tomó hace 307 días y no hay ningún pull request abierto. Abierto
Todos los issues de formio/react
Issues similares
-
bot:ai-assisted component:platform-js status:untriaged
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
midnightntwrk/platform-js#38 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ranxianglei/billion-context#7068 ·
Los mantenedores suelen responder en 1 día
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ilan-pinto/roaring-lions#1552 ·
Los mantenedores suelen responder en 1 día