Skip to content

Latest commit

 

History

History
251 lines (146 loc) · 5.73 KB

File metadata and controls

251 lines (146 loc) · 5.73 KB

react-bs-datatable / helpers/types

Module: helpers/types

Table of contents

Interfaces

Type aliases

Type aliases

CheckboxOnChange

Ƭ CheckboxOnChange: (params: { checkboxProp: string ; nextCheckboxState: CheckboxState }, event: { checkbox?: React.ChangeEvent<HTMLInputElement> ; others?: React.MouseEvent<HTMLElement> }) => void

Type declaration

▸ (params, event): void

The helper type for the checkbox change eveent.

Parameters
Name Type
params Object
params.checkboxProp string
params.nextCheckboxState CheckboxState
event Object
event.checkbox? React.ChangeEvent<HTMLInputElement>
event.others? React.MouseEvent<HTMLElement>
Returns

void

Defined in

helpers/types.ts:172


ColumnProcessObj

Ƭ ColumnProcessObj<TColumnType, TReturnType>: Partial<{ [K in keyof TColumnType]: Function }>

This is the object of key/value which is used to transform a column's value to another form.

At the moment, this is mostly useful for sorting, as for sorting, the most reliable way is to convert to numbers. While sorting strings is also possible, certain formats can make the sort result incorrect, e.g. sorting formatted dates.

deprecated use ColumnValueProcessor instead.

Type parameters

Name Type
TColumnType TColumnType
TReturnType string

Defined in

helpers/types.ts:133


ColumnValueProcessor

Ƭ ColumnValueProcessor<TColumnType>: Partial<{ [K in keyof TColumnType]: Function }> | (key: keyof TColumnType, rowValue: TColumnType) => string | number | TColumnType[keyof TColumnType]

This is the object of key/value which is used to transform a column's value to another form.

At the moment, this is mostly useful for sorting, as for sorting, the most reliable way is to convert to numbers. While sorting strings is also possible, certain formats can make the sort result incorrect, e.g. sorting formatted dates.

Type parameters

Name
TColumnType

Defined in

helpers/types.ts:113


FilterOnChange

Ƭ FilterOnChange: (nextState: string) => void

Type declaration

▸ (nextState): void

The helper type for the filter change event.

Parameters
Name Type
nextState string
Returns

void

Defined in

helpers/types.ts:147


PaginationOnChange

Ƭ PaginationOnChange: (nextState: number) => void

Type declaration

▸ (nextState): void

The helper type for the sort by prop change event.

Parameters
Name Type
nextState number
Returns

void

Defined in

helpers/types.ts:162


RowsPerPageOnChange

Ƭ RowsPerPageOnChange: (nextState: number) => void

Type declaration

▸ (nextState): void

The helper type for the rows per page change event.

Parameters
Name Type
nextState number
Returns

void

Defined in

helpers/types.ts:167


SortByPropOnChange

Ƭ SortByPropOnChange: (sortedProp: string) => void

Type declaration

▸ (sortedProp): void

The helper type for the sort by prop change event.

Parameters
Name Type
sortedProp string
Returns

void

Defined in

helpers/types.ts:157


SortOnChange

Ƭ SortOnChange: (nextProp: SortType) => void

Type declaration

▸ (nextProp): void

The helper type for the sort by next prop change event.

Parameters
Name Type
nextProp SortType
Returns

void

Defined in

helpers/types.ts:152


TableRowType

Ƭ TableRowType<T>: Record<string, T>

This is used for the extend keyword in the components.

Type parameters

Name Type
T any

Defined in

helpers/types.ts:140