mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 10:35:37 +00:00
fix: apply feedback update
This commit is contained in:
parent
bc5d6d3303
commit
fddaafc0e1
@ -53,12 +53,14 @@ interface ContentFieldInput {
|
||||
[key: string]: any;
|
||||
}
|
||||
>;
|
||||
idx: number;
|
||||
}
|
||||
|
||||
const ContentFieldInput: React.FC<ContentFieldInput> = ({
|
||||
contentField: contentField,
|
||||
field,
|
||||
errors,
|
||||
idx,
|
||||
}) => {
|
||||
const { t } = useTranslate();
|
||||
|
||||
@ -68,7 +70,7 @@ const ContentFieldInput: React.FC<ContentFieldInput> = ({
|
||||
case ContentFieldType.URL:
|
||||
return (
|
||||
<Input
|
||||
autoFocus
|
||||
autoFocus={idx === 0}
|
||||
multiline={contentField.type === ContentFieldType.TEXTAREA}
|
||||
rows={contentField.type === ContentFieldType.TEXTAREA ? 5 : 1}
|
||||
label={t(`label.${contentField.name}`, {
|
||||
@ -226,7 +228,7 @@ export const ContentDialog: FC<ContentDialogProps> = ({
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<ContentContainer>
|
||||
{(contentType?.fields || []).map((contentField) => (
|
||||
{(contentType?.fields || []).map((contentField, index) => (
|
||||
<ContentItem key={contentField.name}>
|
||||
<Controller
|
||||
name={contentField.name}
|
||||
@ -249,6 +251,7 @@ export const ContentDialog: FC<ContentDialogProps> = ({
|
||||
contentField={contentField}
|
||||
field={field}
|
||||
errors={errors}
|
||||
idx={index}
|
||||
/>
|
||||
</FormControl>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user