New Changes with table Classes and Modification
This commit is contained in:
@@ -279,6 +279,7 @@ const studentColumns = [
|
||||
pagignations
|
||||
classInfos="classNames"
|
||||
tableClassNames="wr:rounded-2xl wr:border-2 wr:border-red-500"
|
||||
rowClick="checkDetails"
|
||||
/>
|
||||
</div>
|
||||
</ComponentLayout>
|
||||
@@ -423,7 +424,7 @@ const studentColumns = [
|
||||
|
||||
window.classNames = {
|
||||
row: (_row: any, idx: number) => ({
|
||||
"wr:!bg-gray-50 wr:text-black": _row.role === "Engineer",
|
||||
"wr:!bg-gray-50 wr:!text-black": _row.role === "Engineer",
|
||||
}),
|
||||
|
||||
column: (col: any) =>
|
||||
@@ -436,4 +437,10 @@ const studentColumns = [
|
||||
? "wr:text-green-600"
|
||||
: "",
|
||||
};
|
||||
|
||||
window.checkDetails = (row: any) => {
|
||||
alert(
|
||||
`Student Details:\n\nName: ${row.name}\nAge: ${row.age}\nRole: ${row.role}`,
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user