1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 05:49:40 +02:00
portainer/app/react/components/datatables/extend-options/mergeOptions.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
303 B
TypeScript
Raw Permalink Normal View History

import { TableOptions } from '@tanstack/react-table';
import { OptionsExtension } from './types';
export function mergeOptions<D>(
...extenders: Array<OptionsExtension<D>>
): OptionsExtension<D> {
return (options: TableOptions<D>) =>
extenders.reduce((acc, option) => option(acc), options);
}