mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-17 08:54:27 +02:00
Add extraProps param on column defs
This commit is contained in:
@@ -320,6 +320,7 @@ export const getColumnDefs = (columns: PersistedTableColumn[]) => {
|
|||||||
columnDefs.push({
|
columnDefs.push({
|
||||||
...presetColumn,
|
...presetColumn,
|
||||||
initialWidth: column.width,
|
initialWidth: column.width,
|
||||||
|
...column.extraProps,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* eslint-disable prefer-destructuring */
|
/* eslint-disable prefer-destructuring */
|
||||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
|
import { ColDef } from '@ag-grid-community/core';
|
||||||
import isElectron from 'is-electron';
|
import isElectron from 'is-electron';
|
||||||
import merge from 'lodash/merge';
|
import merge from 'lodash/merge';
|
||||||
import create from 'zustand';
|
import create from 'zustand';
|
||||||
@@ -19,6 +20,7 @@ import {
|
|||||||
|
|
||||||
export type PersistedTableColumn = {
|
export type PersistedTableColumn = {
|
||||||
column: TableColumn;
|
column: TableColumn;
|
||||||
|
extraProps?: Partial<ColDef>;
|
||||||
width: number;
|
width: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user