mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: apply feedback updates
This commit is contained in:
@@ -66,7 +66,13 @@ export const NlpValueForm: FC<ComponentFormProps<NlpValueFormProps>> = ({
|
||||
toast.success(t("message.success_save"));
|
||||
},
|
||||
});
|
||||
const { reset, register, handleSubmit, control } = useForm<
|
||||
const {
|
||||
reset,
|
||||
register,
|
||||
handleSubmit,
|
||||
control,
|
||||
formState: { errors },
|
||||
} = useForm<
|
||||
INlpValueAttributes & {
|
||||
expressions: string[];
|
||||
}
|
||||
@@ -111,8 +117,10 @@ export const NlpValueForm: FC<ComponentFormProps<NlpValueFormProps>> = ({
|
||||
<ContentItem>
|
||||
<Input
|
||||
label={t("placeholder.nlp_value")}
|
||||
error={!!errors.value}
|
||||
required
|
||||
autoFocus
|
||||
helperText={errors.value ? errors.value.message : null}
|
||||
{...register("value", validationRules.value)}
|
||||
/>
|
||||
</ContentItem>
|
||||
|
||||
@@ -18,6 +18,7 @@ export const NlpValueFormDialog = <
|
||||
) => (
|
||||
<GenericFormDialog<T>
|
||||
Form={NlpValueForm}
|
||||
rowKey="defaultValues"
|
||||
addText="title.new_nlp_entity_value"
|
||||
editText="title.edit_nlp_value"
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user