Skip to content

Commit cefae0a

Browse files
committed
feat: update table
1 parent c16e9e4 commit cefae0a

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/components/Table/Table.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { groupBy as lodashGroupBy } from 'lodash';
2-
import React, { Fragment, forwardRef, memo, type ForwardedRef } from 'react';
3-
import {
4-
ScrollView,
5-
Text,
6-
TouchableOpacity,
7-
View
8-
} from 'react-native';
2+
import React, {
3+
Fragment,
4+
forwardRef,
5+
memo,
6+
type ForwardedRef,
7+
useImperativeHandle,
8+
} from 'react';
9+
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
910
import type { TableProps, TableRef } from './Table.types';
1011

1112
const Table = forwardRef(
@@ -23,6 +24,10 @@ const Table = forwardRef(
2324
}: TableProps,
2425
ref?: ForwardedRef<TableRef | undefined> | undefined
2526
) => {
27+
// implement ref
28+
useImperativeHandle(ref, () => {
29+
return {};
30+
});
2631
if (groupBy) {
2732
const groupedData = lodashGroupBy(dataSource, groupBy);
2833
return (

0 commit comments

Comments
 (0)