Interface ISearchModalProps<FilterData, RowData, Payload, Field>

Represents the properties for the Search Modal component.

interface ISearchModalProps<
    FilterData extends {} = IAnything,
    RowData extends IRowData = IAnything,
    Payload extends IAnything = IAnything,
    Field extends IField = IField<FilterData, Payload>,
> {
    actions?: IListAction<RowData, Payload>[];
    actionSubject?: TSubject<string>;
    AfterActionList?: any;
    AfterChips?: any;
    AfterOperationList?: any;
    AfterTitle?: any;
    apiRef?: any;
    BeforeActionList?: any;
    BeforeOperationList?: any;
    BeforeSelectionLabel?: any;
    BeforeTitle?: any;
    chipData?: Partial<Record<keyof RowData, boolean>>;
    chips?: IListChip<RowData>[];
    className?: string;
    columns: IColumn<FilterData, RowData, Payload>[];
    customTemplate?: any;
    customTemplateMinHeight?: number;
    data?: RowId[];
    denseHeight?: number;
    fallback?: (e: Error) => void;
    features?:
        | string[]
        | Record<string, Value>
        | () => string[] | Record<string, Value>;
    fetchDebounce?: number;
    filterData?: Partial<FilterData>;
    filterLabel?: string;
    filters?: Field[];
    fullScreen?: boolean;
    handler: ListHandler<FilterData, RowData>;
    hidden?: boolean;
    incomingTransform?: (data: any, payload: any) => FilterData;
    isBaseline?: (field: IField) => boolean;
    isBaselineForRoot?: (field: IField) => boolean;
    isChooser?: boolean;
    isCustom?: boolean;
    isDense?: boolean;
    isInfinite?: boolean;
    isPageItem?: boolean;
    isRowDisabled?: (
        row: RowData,
        params: {
            chips: Partial<Record<keyof RowData, boolean>>;
            filterData: FilterData;
            pagination: ListHandlerPagination;
            payload: Payload;
            search: string;
            sortModel: ListHandlerSortModel<RowData>;
        },
    ) => boolean;
    itemSx?: any;
    labelDisplayedRows?: (
        paginationInfo: {
            count: number;
            from: number;
            page: number;
            to: number;
        },
    ) => string;
    limit?: number;
    modalSizeRequest?: (
        size: ISize,
    ) => { height: number; sx?: any; width: number };
    noDisplayedRows?: boolean;
    onAction?: (
        action: string,
        selectedRows: RowData[],
        reload: (keepPagination?: boolean) => Promise<void>,
    ) => void;
    onChange?: (data: null | RowId[], initial: boolean) => void;
    onChipsChange?: (data: Partial<Record<keyof RowData, boolean>>) => void;
    onClose?: () => void;
    onColumnAction?: (
        field: string,
        action: string,
        selectedRows: RowData[],
        reload: (keepPagination?: boolean) => Promise<void>,
    ) => void;
    onFilterChange?: (data: FilterData) => void;
    onLimitChange?: (limit: number) => void;
    onLoadEnd?: (isOk: boolean) => void;
    onLoadStart?: () => void;
    onOperation?: (
        action: string,
        selectedRows: RowData[],
        isAll: boolean,
        reload: (keepPagination?: boolean) => Promise<void>,
    ) => void;
    onPageChange?: (page: number) => void;
    onRowAction?: (
        action: string,
        row: RowData,
        reload: (keepPagination?: boolean) => Promise<void>,
    ) => void;
    onRows?: (rows: RowData[]) => void;
    onSearchChange?: (search: string) => void;
    onSortModelChange?: (sort: ListHandlerSortModel<RowData>) => void;
    onSubmit?: (
        data: null | RowId[],
        payload: Payload,
    ) => boolean | Promise<boolean>;
    openSubject: TBehaviorSubject<boolean>;
    operations?: IListOperation<RowData, Payload>[];
    outgoingTransform?: (data: any, payload: any) => FilterData;
    page?: number;
    pageItemTemplate?: any;
    pageItemTemplateMinHeight?: number;
    payload?: Payload | () => Payload;
    readTransform?: (
        value: string | string[],
        name: string,
        data: FilterData,
        payload: any,
    ) => Value;
    reloadSubject?: TSubject<void>;
    rerenderSubject?: TSubject<void>;
    rowActions?: IListRowAction<any, any>[];
    rowColor?: (row: RowData) => string | (row: RowData) => Promise<string>;
    rowMark?: (row: RowData) => string | (row: RowData) => Promise<string>;
    rowsPerPage?: (number | { label: string; value: number })[];
    search?: string;
    selectionLabel?: (size: number) => string | Promise<string>;
    selectionMode?: SelectionMode;
    setFilterDataSubject?: TSubject<FilterData>;
    setLimitSubject?: TSubject<number>;
    setPageSubject?: TSubject<number>;
    setRowsSubject?: TSubject<RowData[]>;
    sizeByElement?: boolean;
    sizeRequest?: (size: ISize) => { height: number; sx?: any; width: number };
    slots?: Partial<ISlotFactoryContext>;
    sortModel?: ListHandlerSortModel<RowData>;
    style?: any;
    submitIcon?: any;
    submitLabel?: string;
    throwError?: boolean;
    tileMode?: TileMode;
    title?: string;
    withAllListOperations?: boolean;
    withArrowPagination?: boolean;
    withHideIfEmpty?: boolean;
    withInitialLoader?: boolean;
    withLoader?: boolean;
    withMobile?: boolean;
    withOutlinePaper?: boolean;
    withRangePagination?: boolean;
    withRawSearch?: boolean;
    withRestorePos?: boolean;
    withSearch?: boolean;
    withSelectOnRowClick?: boolean;
    withSingleChip?: boolean;
    withSingleSort?: boolean;
    withToggledFilters?: boolean;
    withTransparentPaper?: boolean;
    writeTransform?: (
        value: string | string[],
        name: string,
        data: FilterData,
        payload: any,
    ) => Value;
}

Type Parameters

Hierarchy

  • Omit<
        IListProps<FilterData, RowData, Payload, Field>,
        keyof {
            heightRequest: never;
            onLoadEnd: never;
            onLoadStart: never;
            onRowClick: never;
            onSelectedRows: never;
            selectedRows: never;
            widthRequest: never;
        },
    >
    • ISearchModalProps

Properties

actionSubject?: TSubject<string>

Subject for trigger action externally

AfterActionList?: any

Represents a React component for AfterActionList.

FilterData - The type of filter data.

RowData - The type of row data.

Payload - The type of payload.

AfterChips?: any

Represents a React component that will be rendered after the chip list.

AfterOperationList?: any

Represents the AfterOperationList component.

This component is a React component that renders a list of actions to be displayed after a specific operation. It is used to render the list of available actions, typically used for filtering or manipulating data.

The type of data used for filtering.

The type of data associated with each row.

The type of payload used for each action.

AfterTitle?: any
apiRef?: any
BeforeActionList?: any

Represents a React component type for BeforeActionList.

The type of data used for filtering.

The type of data used for individual rows.

The type of payload for action.

BeforeOperationList?: any

A React component that represents a list of position actions before an operation.

The type of data used for filtering the list

The type of data used for each row in the list

The type of data sent as a payload during an operation

BeforeSelectionLabel?: any

Represents a React component type for BeforeSelectionLabel.

The type of data used for filtering.

The type of data used for individual rows.

The type of payload for action.

BeforeTitle?: any
chipData?: Partial<Record<keyof RowData, boolean>>
chips?: IListChip<RowData>[]
className?: string
customTemplate?: any

Represents a custom template component for rendering a tile.

The type of data for the tile row.

The type of payload associated with the tile.

customTemplateMinHeight?: number

Represents the minimum height for a custom template.

data?: RowId[]
denseHeight?: number

Represents the height of an element, measured in pixels.

fallback?: (e: Error) => void
features?:
    | string[]
    | Record<string, Value>
    | () => string[] | Record<string, Value>
fetchDebounce?: number

Represents the debounce time in milliseconds for performing fetch requests.

filterData?: Partial<FilterData>
filterLabel?: string
filters?: Field[]
fullScreen?: boolean
hidden?: boolean
incomingTransform?: (data: any, payload: any) => FilterData
isBaseline?: (field: IField) => boolean
isBaselineForRoot?: (field: IField) => boolean
isChooser?: boolean
isCustom?: boolean
isDense?: boolean
isInfinite?: boolean
isPageItem?: boolean
isRowDisabled?: (
    row: RowData,
    params: {
        chips: Partial<Record<keyof RowData, boolean>>;
        filterData: FilterData;
        pagination: ListHandlerPagination;
        payload: Payload;
        search: string;
        sortModel: ListHandlerSortModel<RowData>;
    },
) => boolean

Determines if a row is disabled based on various parameters.

Type declaration

itemSx?: any
labelDisplayedRows?: (
    paginationInfo: {
        count: number;
        from: number;
        page: number;
        to: number;
    },
) => string

Returns a string containing information about the displayed rows label.

Type declaration

    • (
          paginationInfo: {
              count: number;
              from: number;
              page: number;
              to: number;
          },
      ): string
    • Parameters

      • paginationInfo: { count: number; from: number; page: number; to: number }

        An object containing pagination information.

        • count: number

          The total count of rows.

        • from: number

          The starting index of the displayed rows.

        • page: number

          The current page.

        • to: number

          The ending index of the displayed rows.

      Returns string

      • The label displaying information about the displayed rows.
limit?: number
modalSizeRequest?: (size: ISize) => { height: number; sx?: any; width: number }

Custom sizeRequest for modal filters

noDisplayedRows?: boolean
onAction?: (
    action: string,
    selectedRows: RowData[],
    reload: (keepPagination?: boolean) => Promise<void>,
) => void
onChange?: (data: null | RowId[], initial: boolean) => void
onChipsChange?: (data: Partial<Record<keyof RowData, boolean>>) => void
onClose?: () => void
onColumnAction?: (
    field: string,
    action: string,
    selectedRows: RowData[],
    reload: (keepPagination?: boolean) => Promise<void>,
) => void
onFilterChange?: (data: FilterData) => void
onLimitChange?: (limit: number) => void
onLoadEnd?: (isOk: boolean) => void
onLoadStart?: () => void
onOperation?: (
    action: string,
    selectedRows: RowData[],
    isAll: boolean,
    reload: (keepPagination?: boolean) => Promise<void>,
) => void
onPageChange?: (page: number) => void
onRowAction?: (
    action: string,
    row: RowData,
    reload: (keepPagination?: boolean) => Promise<void>,
) => void
onRows?: (rows: RowData[]) => void
onSearchChange?: (search: string) => void
onSortModelChange?: (sort: ListHandlerSortModel<RowData>) => void
onSubmit?: (
    data: null | RowId[],
    payload: Payload,
) => boolean | Promise<boolean>
openSubject: TBehaviorSubject<boolean>
operations?: IListOperation<RowData, Payload>[]
outgoingTransform?: (data: any, payload: any) => FilterData
page?: number
pageItemTemplate?: any

Represents a custom template component for rendering a tile.

The type of data for the tile row.

The type of payload associated with the tile.

pageItemTemplateMinHeight?: number

Represents the minimum height for a page template.

payload?: Payload | () => Payload
readTransform?: (
    value: string | string[],
    name: string,
    data: FilterData,
    payload: any,
) => Value
reloadSubject?: TSubject<void>
rerenderSubject?: TSubject<void>
rowActions?: IListRowAction<any, any>[]
rowColor?: (row: RowData) => string | (row: RowData) => Promise<string>
rowMark?: (row: RowData) => string | (row: RowData) => Promise<string>
rowsPerPage?: (number | { label: string; value: number })[]
search?: string
selectionLabel?: (size: number) => string | Promise<string>
selectionMode?: SelectionMode
setFilterDataSubject?: TSubject<FilterData>
setLimitSubject?: TSubject<number>
setPageSubject?: TSubject<number>
setRowsSubject?: TSubject<RowData[]>
sizeByElement?: boolean
sizeRequest?: (size: ISize) => { height: number; sx?: any; width: number }
slots?: Partial<ISlotFactoryContext>
style?: any
submitIcon?: any
submitLabel?: string
throwError?: boolean
tileMode?: TileMode

Tiling mode for custom template

title?: string
withAllListOperations?: boolean
withArrowPagination?: boolean
withHideIfEmpty?: boolean
withInitialLoader?: boolean
withLoader?: boolean
withMobile?: boolean
withOutlinePaper?: boolean
withRangePagination?: boolean
withRawSearch?: boolean
withRestorePos?: boolean
withSearch?: boolean
withSelectOnRowClick?: boolean
withSingleChip?: boolean
withSingleSort?: boolean
withToggledFilters?: boolean
withTransparentPaper?: boolean
writeTransform?: (
    value: string | string[],
    name: string,
    data: FilterData,
    payload: any,
) => Value