Skip to content

ColumnFactory

Defined in: packages/core/src/class/ColumnFactory.ts:96

OOP column registry replacing the old fixed set of exported factory functions. t and shared defaults are captured once; every builder method returns a framework-agnostic ColumnConfig descriptor that @flextable/react and @flextable/vue each translate into a real ColumnDef with their own renderers. Unknown column kinds can be added via registerColumnType without forking the library.

TEntity extends EntityLike

new ColumnFactory<TEntity>(t, defaults?): ColumnFactory<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:102

TranslateFn

ColumnFactoryDefaults = {}

ColumnFactory<TEntity>

actions(options): ActionsColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:256

ActionsColumnOptions<TEntity>

ActionsColumnConfig<TEntity>


avatar(options): AvatarColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:119

AvatarColumnOptions<TEntity>

AvatarColumnConfig<TEntity>


badge<TVariant>(options): BadgeColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:230

TVariant extends string = string

BadgeColumnOptions<TEntity, TVariant>

BadgeColumnConfig<TEntity>


count(options): CountColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:219

CountColumnOptions<TEntity>

CountColumnConfig<TEntity>


custom<TResolved, TOptions>(kind, options): CustomColumnConfig<TEntity, TResolved>

Defined in: packages/core/src/class/ColumnFactory.ts:304

TResolved = unknown

TOptions = unknown

string

TOptions

CustomColumnConfig<TEntity, TResolved>


date(options): DateColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:191

DateColumnOptions<TEntity>

DateColumnConfig<TEntity>


expandRow(options?): ExpandRowColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:281

CommonColumnOptions<TEntity> = {}

ExpandRowColumnConfig<TEntity>


name(options): NameColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:139

NameColumnOptions<TEntity>

NameColumnConfig<TEntity>


registerColumnType<TOptions, TResolved>(kind, builder): void

Defined in: packages/core/src/class/ColumnFactory.ts:297

Plugin escape hatch: register a builder for a column kind this class doesn’t ship (e.g. “currency”). builder receives t and the caller’s options and resolves them into whatever props the framework renderer registered for kind expects — custom() wraps the result.

TOptions

TResolved = TOptions

string

ColumnTypeBuilder<TOptions, TResolved>

void


select(options?): SelectColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:108

CommonColumnOptions<TEntity> = {}

SelectColumnConfig<TEntity>


text(options): TextColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:169

TextColumnOptions<TEntity>

TextColumnConfig<TEntity>


updated(options): DateColumnConfig<TEntity>

Defined in: packages/core/src/class/ColumnFactory.ts:205

Convenience wrapper around date() defaulting to the updatedAt accessor.

Omit<DateColumnOptions<TEntity>, "accessorKey" | "headerKey"> & object

DateColumnConfig<TEntity>