react-bs-datatable / helpers/types
- CheckboxOnChange
- ColumnProcessObj
- ColumnValueProcessor
- FilterOnChange
- PaginationOnChange
- RowsPerPageOnChange
- SortByPropOnChange
- SortOnChange
- TableRowType
Ƭ CheckboxOnChange: (params: { checkboxProp: string ; nextCheckboxState: CheckboxState }, event: { checkbox?: React.ChangeEvent<HTMLInputElement> ; others?: React.MouseEvent<HTMLElement> }) => void
▸ (params, event): void
The helper type for the checkbox change eveent.
| Name | Type |
|---|---|
params |
Object |
params.checkboxProp |
string |
params.nextCheckboxState |
CheckboxState |
event |
Object |
event.checkbox? |
React.ChangeEvent<HTMLInputElement> |
event.others? |
React.MouseEvent<HTMLElement> |
void
Ƭ 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.
| Name | Type |
|---|---|
TColumnType |
TColumnType |
TReturnType |
string |
Ƭ 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.
| Name |
|---|
TColumnType |
Ƭ FilterOnChange: (nextState: string) => void
▸ (nextState): void
The helper type for the filter change event.
| Name | Type |
|---|---|
nextState |
string |
void
Ƭ PaginationOnChange: (nextState: number) => void
▸ (nextState): void
The helper type for the sort by prop change event.
| Name | Type |
|---|---|
nextState |
number |
void
Ƭ RowsPerPageOnChange: (nextState: number) => void
▸ (nextState): void
The helper type for the rows per page change event.
| Name | Type |
|---|---|
nextState |
number |
void
Ƭ SortByPropOnChange: (sortedProp: string) => void
▸ (sortedProp): void
The helper type for the sort by prop change event.
| Name | Type |
|---|---|
sortedProp |
string |
void
Ƭ SortOnChange: (nextProp: SortType) => void
▸ (nextProp): void
The helper type for the sort by next prop change event.
| Name | Type |
|---|---|
nextProp |
SortType |
void
Ƭ TableRowType<T>: Record<string, T>
This is used for the extend keyword in the components.
| Name | Type |
|---|---|
T |
any |