@bluemarble/bm-components 1.13.4 → 1.14.0

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.
package/dist/index.mjs CHANGED
@@ -4800,9 +4800,15 @@ function useGrid({
4800
4800
  },
4801
4801
  []
4802
4802
  );
4803
- const setSort = useCallback5((prop, direction) => {
4803
+ const clearSort = useCallback5(() => {
4804
+ setSortedBy([]);
4805
+ }, []);
4806
+ const appendSort = useCallback5((prop, direction) => {
4804
4807
  setSortedBy((prev) => [...prev, { prop, direction }]);
4805
4808
  }, []);
4809
+ const setSort = useCallback5((prop, direction) => {
4810
+ setSortedBy([{ prop, direction }]);
4811
+ }, []);
4806
4812
  const onSortBy = useCallback5(
4807
4813
  (prop) => {
4808
4814
  if (!prop)
@@ -4890,18 +4896,20 @@ function useGrid({
4890
4896
  }, [externalDefaultData]);
4891
4897
  return {
4892
4898
  data: displayData,
4893
- set,
4894
- onSortBy,
4895
4899
  sortedBy,
4896
4900
  defaultData,
4897
4901
  columns,
4898
4902
  currentPage,
4899
4903
  totalNumberOfPages: totalNumberOfPages < 0 ? 0 : totalNumberOfPages,
4900
- onPageChange,
4901
- setRowsPerPage: onChangeRowsPerPage,
4902
4904
  rowsPerPageOptions,
4903
4905
  rowsPerPage,
4904
- setSort
4906
+ set,
4907
+ onSortBy,
4908
+ onPageChange,
4909
+ setRowsPerPage: onChangeRowsPerPage,
4910
+ appendSort,
4911
+ setSort,
4912
+ clearSort
4905
4913
  };
4906
4914
  }
4907
4915
  function searchKeysForValue(row, compare) {