Ver Fonte

Update login component (#907)

Dinh Long Nguyen há 1 ano atrás
pai
commit
b0c673ecb8
1 ficheiros alterados com 2 adições e 5 exclusões
  1. 2 5
      frontend/taipy-gui/src/components/Taipy/Login.tsx

+ 2 - 5
frontend/taipy-gui/src/components/Taipy/Login.tsx

@@ -66,12 +66,9 @@ const Login = (props: LoginProps) => {
 
 
     const handleAction = useCallback(
     const handleAction = useCallback(
         (evt: MouseEvent<HTMLElement>) => {
         (evt: MouseEvent<HTMLElement>) => {
-            if (!user || !password) {
-                return;
-            }
             const { close } = evt?.currentTarget.dataset || {};
             const { close } = evt?.currentTarget.dataset || {};
             const args = close
             const args = close
-                ? ["", "", document.location.pathname.substring(1)]
+                ? [null, null, document.location.pathname.substring(1)]
                 : [user, password, document.location.pathname.substring(1)];
                 : [user, password, document.location.pathname.substring(1)];
             setShowProgress(true);
             setShowProgress(true);
             dispatch(createSendActionNameAction(id, module, onAction, ...args));
             dispatch(createSendActionNameAction(id, module, onAction, ...args));
@@ -112,7 +109,7 @@ const Login = (props: LoginProps) => {
     }, []);
     }, []);
 
 
     return onlyOne ? (
     return onlyOne ? (
-        <Dialog id={id} onClose={handleAction} open={true} className={className}>
+        <Dialog id={id} open={true} className={className}>
             <DialogTitle sx={titleSx}>
             <DialogTitle sx={titleSx}>
                 {title}
                 {title}
                 <IconButton aria-label="close" onClick={handleAction} sx={closeSx} title="close" data-close>
                 <IconButton aria-label="close" onClick={handleAction} sx={closeSx} title="close" data-close>