Comments (7)
me too. the source appears to be this:
from mdb-react-ui-kit.
Can you post the code that causes this error? We'll check why this is happening
from mdb-react-ui-kit.
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.
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.
Hey was the resolved ?
from mdb-react-ui-kit.
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.
The issue was fixed in version 6.2.0.
from mdb-react-ui-kit.
Related Issues (20)
- MDB Layout issues throughout the project which was working fine earlier HOT 1
- MDBModalDialog container should be placed in same container as modal's backdrop HOT 2
- iOS/Android Deployment Error HOT 1
- Broken MDBCollapse component in version 2.1.0 HOT 1
- Dropdown menu position issue HOT 1
- TimePicker can not get the value I set HOT 1
- ReferenceError: document is not defined HOT 1
- Replace 'transition-property' with 'transition' HOT 2
- MDBDropdown has issue when using in react-styleguidist HOT 6
- Question: mdbreact vs mdb-react-ui-kit - which package is better? HOT 4
- cli is looking for react v17 HOT 1
- Runtime error HOT 1
- MDBModal keeps display:block after 2nd time closed HOT 7
- Module parse failed error HOT 2
- MDBCollapse keep height after animation ends HOT 2
- MDBCollapse does not have onHide and onShow events HOT 3
- Failed to execute 'getComputedStyle' on 'Window' HOT 1
- Using MDBootstrap with next.js App Router HOT 1
- Error when installed version of chart.js is > 4.3.3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdb-react-ui-kit.