fix create user bug (#2317)
This commit is contained in:
parent
3efffab55d
commit
0c628e2b7c
2 changed files with 6 additions and 4 deletions
|
@ -409,7 +409,11 @@ export const UserForm = ({
|
|||
<ActionGroup>
|
||||
<Button
|
||||
data-testid={!user?.id ? "create-user" : "save-user"}
|
||||
isDisabled={!user?.id && !watchUsernameInput}
|
||||
isDisabled={
|
||||
!user?.id &&
|
||||
!watchUsernameInput &&
|
||||
!realm?.registrationEmailAsUsername
|
||||
}
|
||||
variant="primary"
|
||||
type="submit"
|
||||
>
|
||||
|
|
|
@ -152,9 +152,7 @@ const UsersTabs = () => {
|
|||
<ImpersonateConfirm />
|
||||
<DeleteConfirm />
|
||||
<ViewHeader
|
||||
titleKey={
|
||||
userForm.getValues().username || user?.username || t("createUser")
|
||||
}
|
||||
titleKey={user?.id ? user.username! : t("createUser")}
|
||||
divider={!id}
|
||||
dropdownItems={[
|
||||
<DropdownItem
|
||||
|
|
Loading…
Reference in a new issue