mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
16 lines
347 B
TypeScript
16 lines
347 B
TypeScript
|
import { TableOptions } from '@tanstack/react-table';
|
||
|
|
||
|
import { DefaultType } from '../types';
|
||
|
|
||
|
export function withMeta<D extends DefaultType>(meta: Record<string, unknown>) {
|
||
|
return function extendOptions(options: TableOptions<D>) {
|
||
|
return {
|
||
|
...options,
|
||
|
meta: {
|
||
|
...options.meta,
|
||
|
...meta,
|
||
|
},
|
||
|
};
|
||
|
};
|
||
|
}
|