Skip to content

Commit

Permalink
Fixed bug with deleted enum values. (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leshe4ka authored Feb 2, 2022
1 parent 33e2818 commit d2f34c8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const DatasetFieldEnumsFormItem: React.FC<DatasetFieldEnumsFormItemProps> = ({
<Controller
name={`enums.${itemIndex}.name`}
control={control}
defaultValue={getValues(`enums.${itemIndex}.name`)}
rules={{
required: true,
validate: setTextValidationByType,
Expand All @@ -79,6 +80,7 @@ const DatasetFieldEnumsFormItem: React.FC<DatasetFieldEnumsFormItemProps> = ({
/>
<Controller
name={`enums.${itemIndex}.description`}
defaultValue={getValues(`enums.${itemIndex}.description`)}
control={control}
render={({ field }) => (
<ValueDescriptionContainer sx={{ mr: 1 }}>
Expand Down

0 comments on commit d2f34c8

Please sign in to comment.