Changes to datagrid

This commit is contained in:
Jeremy Rangel
2025-02-01 22:16:55 -08:00
parent 05664f161a
commit 6dd4e7e1e2
7 changed files with 73 additions and 36 deletions

View File

@ -4,6 +4,7 @@ import {Icon, calendar } from '@wordpress/icons'; // Make sure to use the correc
const LCPDataGridHeader = (props) => {
const { displayName, column, updateData, sort, menu } = props;
const colId = column.colId;
const lcpDataType = column.getColDef().customDataType; // Retrieve custom data type
// Sorting function
const handleSort = () => {
@ -20,6 +21,7 @@ const LCPDataGridHeader = (props) => {
{/* Calendar Icon */}
<span style={{ marginRight: '8px', display: 'inline-block' }}>
<Icon icon={ calendar } />
{lcpDataType}
</span>
@ -28,7 +30,7 @@ const LCPDataGridHeader = (props) => {
style={{ fontWeight: 'bold', fontSize: '16px' }}
onClick={handleSort} // Click header for sorting
>
{displayName}
{colId}
</span>
{/* Sorting Indicators */}