Skip to content

Commit

Permalink
Merge pull request #250 from Dias999/feature/Crud_Mod-Allow_inital_sort
Browse files Browse the repository at this point in the history
feat: crud module - allow initial sort
  • Loading branch information
andreneto97 authored Sep 30, 2024
2 parents 79de296 + 1843f5d commit bb17fa2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-material-ui/src/modules/crud/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useEffect, useMemo, useState } from 'react';
import { Box } from '@mui/material';

import useTable from '../../components/Table/useTable';
import { Order } from '../../components/Table/types';
import { TableProps as InnerTableProps } from '../../components/Table/Table';
import Text from '../../components/Text';
import TableSubmodule, {
Expand Down Expand Up @@ -51,6 +52,8 @@ interface TableProps {
onDeleteError?: (error: unknown) => void;
mobileModalTitleSrc?: string;
allowModalPreview?: boolean;
order?: Order;
orderBy?: string;
}

type FormProps = Pick<
Expand Down Expand Up @@ -114,6 +117,8 @@ const CrudModule = (props: ModuleProps) => {
onError: props.onFetchError,
},
navigate: props.navigate,
order: props.tableProps.order,
orderBy: props.tableProps.orderBy,
});

// Assign functions and data to CrudControls
Expand Down

0 comments on commit bb17fa2

Please sign in to comment.