GridTableRows.tsx 639 B

12345678910111213141516171819202122
  1. import { DatabaseController } from '@/appflowy_app/stores/effects/database/database_controller';
  2. import { RowInfo } from '@/appflowy_app/stores/effects/database/row/row_cache';
  3. import { GridTableRow } from './GridTableRow';
  4. export const GridTableRows = ({
  5. viewId,
  6. controller,
  7. allRows,
  8. onOpenRow,
  9. }: {
  10. viewId: string;
  11. controller: DatabaseController;
  12. allRows: readonly RowInfo[];
  13. onOpenRow: (rowId: RowInfo) => void;
  14. }) => {
  15. return (
  16. <tbody>
  17. {allRows.map((row, i) => {
  18. return <GridTableRow onOpenRow={onOpenRow} row={row} key={i} viewId={viewId} controller={controller} />;
  19. })}
  20. </tbody>
  21. );
  22. };