Skip to content

Commit

Permalink
feat: update table
Browse files Browse the repository at this point in the history
  • Loading branch information
npv2k1 committed Nov 20, 2023
1 parent c16e9e4 commit cefae0a
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { groupBy as lodashGroupBy } from 'lodash';
import React, { Fragment, forwardRef, memo, type ForwardedRef } from 'react';
import {
ScrollView,
Text,
TouchableOpacity,
View
} from 'react-native';
import React, {
Fragment,
forwardRef,
memo,
type ForwardedRef,
useImperativeHandle,
} from 'react';
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
import type { TableProps, TableRef } from './Table.types';

const Table = forwardRef(
Expand All @@ -23,6 +24,10 @@ const Table = forwardRef(
}: TableProps,
ref?: ForwardedRef<TableRef | undefined> | undefined
) => {
// implement ref
useImperativeHandle(ref, () => {
return {};
});
if (groupBy) {
const groupedData = lodashGroupBy(dataSource, groupBy);
return (
Expand Down

0 comments on commit cefae0a

Please sign in to comment.