mig-schema-table 4.2.14 → 4.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { default as React, Dispatch, SetStateAction } from 'react';
1
+ import { default as React } from 'react';
2
2
  import { oas31 } from 'openapi3-ts';
3
3
  import { TColumnFilterValue } from '../index';
4
4
  import { IColumnConfig } from '../../types';
@@ -17,10 +17,9 @@ type TThMenuProps<T> = IThMenuConfig<T> & {
17
17
  onInputKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
18
18
  propIsRequired: boolean;
19
19
  propSchema: oas31.SchemaObject;
20
- setSortAsc: Dispatch<SetStateAction<boolean>>;
21
- setSortColumn: Dispatch<SetStateAction<string>>;
20
+ setFilterSortColumn: (sortColumn: string, sortAsc: boolean) => void;
22
21
  translate: (key: string, ...args: Array<string | number>) => string;
23
22
  value: TColumnFilterValue;
24
23
  };
25
- declare const MemoizedThMenu: <T>({ isSortable, isFilterable, onChange, onClose, onInputKeyDown, propConfig, propIsRequired, propName, propSchema, referenceElement, setSortAsc, setSortColumn, translate, value, }: TThMenuProps<T>) => import("react/jsx-runtime").JSX.Element | null;
24
+ declare const MemoizedThMenu: <T>({ isSortable, isFilterable, onChange, onClose, onInputKeyDown, propConfig, propIsRequired, propName, propSchema, referenceElement, setFilterSortColumn, translate, value, }: TThMenuProps<T>) => import("react/jsx-runtime").JSX.Element | null;
26
25
  export default MemoizedThMenu;
@@ -1,4 +1,4 @@
1
- import { default as React, Dispatch, SetStateAction } from 'react';
1
+ import { default as React } from 'react';
2
2
  import { oas31 } from 'openapi3-ts';
3
3
  import { VariableSizeGrid, VariableSizeListProps } from 'react-window';
4
4
  import { IColumnConfig, IRenderData } from '../types';
@@ -21,8 +21,7 @@ export interface ICustomElementProps {
21
21
  }
22
22
  export interface ISchemaTableProps<T> {
23
23
  Heading?: React.ComponentType<VariableSizeListProps & {
24
- setSortAsc?: Dispatch<SetStateAction<boolean>>;
25
- setSortColumn?: Dispatch<SetStateAction<string>>;
24
+ setFilterSortColumn?: (sortColumn: string, sortAsc: boolean) => void;
26
25
  sortAsc?: boolean;
27
26
  sortColumn?: string;
28
27
  sortedRenderData?: IRenderData[];
@@ -28,8 +28,7 @@ export interface ISchemaTableContext<T = any> {
28
28
  setCustomColumnNames: Dispatch<SetStateAction<string[] | undefined>>;
29
29
  setCustomColumnWidths: Dispatch<SetStateAction<number[] | undefined>>;
30
30
  setMenuConfig: React.Dispatch<React.SetStateAction<IThMenuConfig<T> | undefined>>;
31
- setSortAsc: React.Dispatch<React.SetStateAction<boolean>>;
32
- setSortColumn: React.Dispatch<React.SetStateAction<string>>;
31
+ setFilterSortColumn: (sortColumn: string, sortAsc: boolean) => void;
33
32
  settingsStorageKey?: string;
34
33
  sortAsc?: boolean;
35
34
  sortColumn?: string;