瀏覽代碼

reset not refresh

master
CANCERYS\kw093 1 天之前
父節點
當前提交
203db5ca31
共有 1 個檔案被更改,包括 21 行新增15 行删除
  1. +21
    -15
      src/components/CreateUser/CreateUser.tsx

+ 21
- 15
src/components/CreateUser/CreateUser.tsx 查看文件

@@ -46,7 +46,7 @@ interface Props {
auths: auth[];
}

const CreateUser: React.FC<Props> = async ({ rules, auths }) => {
const CreateUser: React.FC<Props> = ({ rules, auths }) => {
console.log(auths);
const { t } = useTranslation("user");
const formProps = useForm<UserInputs>();
@@ -219,20 +219,26 @@ const CreateUser: React.FC<Props> = async ({ rules, auths }) => {
{tabIndex == 0 && <UserDetail />}
{tabIndex === 1 && <AuthAllocation auths={auths!} />}
<Stack direction="row" justifyContent="flex-end" gap={1}>
<Button
variant="text"
startIcon={<RestartAlt />}
onClick={resetForm}
>
{t("Reset")}
</Button>
<Button
variant="outlined"
startIcon={<Close />}
onClick={handleCancel}
>
{t("Cancel")}
</Button>
<Button
variant="text"
startIcon={<RestartAlt />}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
resetForm(e);
}}
type="button"
>
{t("Reset")}
</Button>
<Button
variant="outlined"
startIcon={<Close />}
onClick={handleCancel}
type="button"
>
{t("Cancel")}
</Button>
<Button variant="contained" startIcon={<Check />} type="submit">
{t("Confirm")}
</Button>


Loading…
取消
儲存