ionav updated

This commit is contained in:
2024-08-12 12:22:01 +05:30
parent e8b9a4af40
commit 0393a18762
49 changed files with 1216 additions and 557 deletions

View File

@@ -50,7 +50,7 @@ const DataTable = ({
const [removed] = reorderedItems.splice(result.source.index, 1);
reorderedItems.splice(result.destination.index, 0, removed);
setData(reorderedItems)
console.log("New Order:", reorderedItems.map((item, index) => ({ index, item })));
// console.log("New Order:", reorderedItems.map((item, index) => ({ index, item })));
};
return (

View File

@@ -12,6 +12,7 @@ import {
Tfoot,
} from "@chakra-ui/react";
import EmptySearchList from "../EmptySearchList";
import { TABLE_PAGINATION } from "../../Constants/Paginations";
const DataTable = ({
data,
@@ -20,6 +21,9 @@ const DataTable = ({
emptyMessage,
centered,
}) => {
console.log(data);
const columnWidth =
data && data[0]
? `${(100 / Object.keys(data[0]).length).toFixed(2)}%`
@@ -42,7 +46,7 @@ const DataTable = ({
}
key={index}
p={3}
width="120px" // Adjust width as needed
width="20px" // Adjust width as needed
color={"#004118"}
whiteSpace="normal" // Allow text to wrap
wordBreak="normal" // Ensure long words break properly
@@ -56,7 +60,7 @@ const DataTable = ({
</Thead>
<Tbody className="web-text-small">
{isLoading
? Array.from({ length: 12 }).map((_, index) => (
? Array.from({ length: TABLE_PAGINATION?.size }).map((_, index) => (
<Tr key={index}>
{tableHeadRow.map((_, i) => (
<Td