Problem in React using DataTable with Bootstrap5
I am using this DataTable, which works correctly, the problem is that when I run it I get this error: “DataTables warning: table id=example – Cannot reinitialise DataTable. For more information about this error, please see https://datatables.net/tn/3“, the solution was to use the following: ‘if ($.fn.DataTable.isDataTable(’#example”)) {
$(“#example”).DataTable().destroy();
}”. But now I have a new problem and I get a very wide and empty column at the end of the table, do you know how to solve it?
How to remove modal div element after navigation in React?
import React, { useState } from “react”; import { useNavigate } from “react-router-dom”; import axios from “axios”; import Cookies from “js-cookie”; const LoginPage = () => { const [email, setEmail] = useState(“”); const [password, setPassword] = useState(“”); const [errors, setErrors] = useState({}); const navigate = useNavigate(); const handleSubmit = async (event) => { event.preventDefault(); try […]