Skip to content

Commit

Permalink
feat: export convertChildrenToColumns functon
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Mar 1, 2020
1 parent 3e348db commit 9c218c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hooks/useColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import {
} from '../interface';
import { INTERNAL_COL_DEFINE } from '../utils/legacyUtil';

function convertChildrenToColumns<RecordType>(children: React.ReactNode): ColumnsType<RecordType> {
export function convertChildrenToColumns<RecordType>(
children: React.ReactNode,
): ColumnsType<RecordType> {
return toArray(children)
.filter(node => React.isValidElement(node))
.map(({ key, props }: React.ReactElement) => {
Expand Down

0 comments on commit 9c218c0

Please sign in to comment.