Merge pull request #16416 from strapi/feature/review-workflow-i18n-change

CM: Set value instead of defaultValue to account for i18n re-renders
This commit is contained in:
Gustav Hansen 2023-04-17 12:43:59 +02:00 committed by GitHub
commit 2146476d7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,6 @@ export function InformationBoxEE() {
components={{
LoadingIndicator: () => <Loader small />,
}}
defaultValue={{ value: activeWorkflowStage?.id, label: activeWorkflowStage?.name }}
error={formattedError}
inputId={ATTRIBUTE_NAME}
isLoading={isLoading}
@ -122,6 +121,7 @@ export function InformationBoxEE() {
options={
workflow ? workflow.stages.map(({ id, name }) => ({ value: id, label: name })) : []
}
value={{ value: activeWorkflowStage?.id, label: activeWorkflowStage?.name }}
/>
<FieldError />