Changes to datagrid
This commit is contained in:
@ -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 */}
|
||||
|
||||
Reference in New Issue
Block a user