simple-table-core 2.0.0 → 2.0.1

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-84c67f6c.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-fc6a62ca.js");require("react/jsx-runtime"),require("react"),exports.AngleDownIcon=e.AngleDownIcon,exports.AngleLeftIcon=e.AngleLeftIcon,exports.AngleRightIcon=e.AngleRightIcon,exports.AngleUpIcon=e.AngleUpIcon,exports.AscIcon=e.AscIcon,exports.BarChart=e.BarChart,exports.CheckIcon=e.CheckIcon,exports.DefaultEmptyState=e.DefaultEmptyState,exports.DescIcon=e.DescIcon,exports.FilterIcon=e.FilterIcon,exports.LineAreaChart=e.LineAreaChart,exports.SelectIcon=e.SelectIcon,exports.SimpleTable=e.SimpleTable;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-84c67f6c.js");require("react/jsx-runtime"),require("react"),exports.AngleDownIcon=e.AngleDownIcon,exports.AngleLeftIcon=e.AngleLeftIcon,exports.AngleRightIcon=e.AngleRightIcon,exports.AngleUpIcon=e.AngleUpIcon,exports.AscIcon=e.AscIcon,exports.BarChart=e.BarChart,exports.CheckIcon=e.CheckIcon,exports.DefaultEmptyState=e.DefaultEmptyState,exports.DescIcon=e.DescIcon,exports.FilterIcon=e.FilterIcon,exports.LineAreaChart=e.LineAreaChart,exports.SelectIcon=e.SelectIcon,exports.SimpleTable=e.SimpleTable;
2
2
  //# sourceMappingURL=index.js.map
@@ -22,7 +22,10 @@ type TableRefType = {
22
22
  /** Returns the current sort state */
23
23
  getSortState: () => SortColumn | null;
24
24
  /** Applies a new sort state to the table. Pass null to clear sort. Direction defaults to cycling through asc -> desc -> null */
25
- applySortState: (accessor: Accessor | null, direction?: SortDirection) => Promise<void>;
25
+ applySortState: (props?: {
26
+ accessor: Accessor;
27
+ direction?: SortDirection;
28
+ }) => Promise<void>;
26
29
  /** Returns the current filter state */
27
30
  getFilterState: () => TableFilterState;
28
31
  /** Applies a filter to a specific column */
@@ -12,7 +12,10 @@ declare const useSortableData: ({ headers, tableRows, externalSortHandling, onSo
12
12
  }) => {
13
13
  sort: SortColumn | null;
14
14
  sortedRows: Row[];
15
- updateSort: (accessor: Accessor | null, direction?: SortDirection) => void;
15
+ updateSort: (props?: {
16
+ accessor: Accessor;
17
+ direction?: SortDirection | undefined;
18
+ } | undefined) => void;
16
19
  computeSortedRowsPreview: (accessor: Accessor) => Row[];
17
20
  };
18
21
  export default useSortableData;
@@ -22,7 +22,10 @@ declare const useTableAPI: ({ cellRegistryRef, clearAllFilters, clearFilter, fil
22
22
  sort: SortColumn | null;
23
23
  tableRef?: MutableRefObject<TableRefType | null> | undefined;
24
24
  updateFilter: (filter: FilterCondition) => void;
25
- updateSort: (accessor: Accessor | null, direction?: SortDirection) => void;
25
+ updateSort: (props?: {
26
+ accessor: Accessor;
27
+ direction?: SortDirection;
28
+ }) => void;
26
29
  visibleRows: TableRow[];
27
30
  }) => void;
28
31
  export default useTableAPI;