Add extraProps param on column defs
This commit is contained in:
parent
3df2915f5f
commit
897af4661b
2 changed files with 3 additions and 0 deletions
|
@ -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 a new issue