Giter Club home page Giter Club logo

Comments (7)

N3koSempai avatar N3koSempai commented on June 7, 2024

me too. the source appears to be this:
error

from mdb-react-ui-kit.

gbujanski avatar gbujanski commented on June 7, 2024

Can you post the code that causes this error? We'll check why this is happening

from mdb-react-ui-kit.

mingisdingis avatar mingisdingis commented on June 7, 2024

i happens most reliably on this page as soon as i click into one of the input fields. thanks for taking a look, i appreciate it

import React, { useState } from "react";
import { useLoginMutation } from "../redux/apiSlice";
import { useNavigate } from "react-router-dom";
import {
MDBInput,
MDBCol,
MDBRow,
MDBBtn,
MDBContainer
} from 'mdb-react-ui-kit';

function Signin() {
const [login] = useLoginMutation();
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const navigate = useNavigate();

const handleSubmit = async (e) => {
e.preventDefault();
const response = await login({ username, password });
if (response.error) {
if ( response.error.status === 422) {
alert(response.error.data.detail[0].msg);
} else {
alert(response.error.data.detail);
}
} else {
navigate("/");
}
};

return (
<>




<form onSubmit={(e) => handleSubmit(e)}>
<MDBInput
className="form-input mb-4"
type="email"
label="Email address"
onChange={(e) => setUsername(e.target.value)}
/>
<MDBInput
className="form-input mb-4"
type="password"
label="Password"
onChange={(e) => setPassword(e.target.value)}
/>

Sign in






</>
);
}

export default Signin;

from mdb-react-ui-kit.

gbujanski avatar gbujanski commented on June 7, 2024

The code seems incomplete. The submit button is missing and the form tag is not closed. I added the missing code and unfortunately, I don't have this error. What version of MDB React are you using?

from mdb-react-ui-kit.

simple40 avatar simple40 commented on June 7, 2024

me too. the source appears to be this: error

Hey was the resolved ?

from mdb-react-ui-kit.

simple40 avatar simple40 commented on June 7, 2024

i happens most reliably on this page as soon as i click into one of the input fields. thanks for taking a look, i appreciate it

import React, { useState } from "react"; import { useLoginMutation } from "../redux/apiSlice"; import { useNavigate } from "react-router-dom"; import { MDBInput, MDBCol, MDBRow, MDBBtn, MDBContainer } from 'mdb-react-ui-kit';

function Signin() { const [login] = useLoginMutation(); const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); const navigate = useNavigate();

const handleSubmit = async (e) => { e.preventDefault(); const response = await login({ username, password }); if (response.error) { if ( response.error.status === 422) { alert(response.error.data.detail[0].msg); } else { alert(response.error.data.detail); } } else { navigate("/"); } };

return ( <> <form onSubmit={(e) => handleSubmit(e)}> <MDBInput className="form-input mb-4" type="email" label="Email address" onChange={(e) => setUsername(e.target.value)} /> <MDBInput className="form-input mb-4" type="password" label="Password" onChange={(e) => setPassword(e.target.value)} /> Sign in </> ); }

export default Signin;

were you able to resolve the error

from mdb-react-ui-kit.

mako3577 avatar mako3577 commented on June 7, 2024

The issue was fixed in version 6.2.0.

from mdb-react-ui-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.