mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add defaultSort property to reactable.Table (#30531)
This commit is contained in:
parent
33f6ddabc9
commit
615629e8f9
3
types/reactable/index.d.ts
vendored
3
types/reactable/index.d.ts
vendored
@ -13,12 +13,15 @@ export interface KeyLabelObject {
|
||||
|
||||
export type ColumnsType = string | KeyLabelObject;
|
||||
|
||||
export type SortDirection = 'asc' | 'desc';
|
||||
|
||||
export type FilterMethodType = (text: string) => void;
|
||||
|
||||
export interface TableComponentProperties<T> {
|
||||
data?: T[];
|
||||
className?: string;
|
||||
columns?: ColumnsType[];
|
||||
defaultSort?: { column: string, direction: SortDirection };
|
||||
id?: string;
|
||||
sortable?: string[];
|
||||
filterable?: string[];
|
||||
|
||||
@ -65,7 +65,7 @@ export class FullblownReactableTestComponent extends React.Component {
|
||||
);
|
||||
}
|
||||
return (
|
||||
<PersonTable>
|
||||
<PersonTable defaultSort={{ column: "name", direction: 'asc' }}>
|
||||
<PersonTableHeader>
|
||||
{columns}
|
||||
</PersonTableHeader>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user