@megha-ui/react 1.2.744 → 1.2.746

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.
@@ -40,7 +40,9 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
40
40
  console.log("Update fixed filter values not implemented", fixedFilterValues);
41
41
  }, locale, formatOptions, exportOptions,
42
42
  // Card wrapper props
43
- withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, subHeader, cardFooter, }) => {
43
+ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, subHeader, cardFooter, getCurrentPage = (page) => {
44
+ console.log("Current page:", page);
45
+ }, }) => {
44
46
  var _a, _b, _c, _d;
45
47
  const [searchQueries, setSearchQueries] = useState({});
46
48
  const [chips, setChips] = useState([]);
@@ -532,6 +534,9 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
532
534
  };
533
535
  const { sortedData, handleSort, sortQueries, setSortQueries } = useSort(filteredData, gridColumns, uniqueSearch, multiSorting, withAscii);
534
536
  const { paginatedData, currentPage, handleChangePage, handleChangeRowsPerPage, rowsPerPage, } = usePagination(sortedData, defaultRowsPerPage);
537
+ useEffect(() => {
538
+ getCurrentPage(currentPage);
539
+ }, [currentPage]);
535
540
  useEffect(() => {
536
541
  const keys = Object.keys(summariseKeys);
537
542
  if (keys.length > 0 && summariseAvailable) {
@@ -172,6 +172,7 @@ export interface OjasGridProps {
172
172
  headerRight?: ReactNode;
173
173
  subHeader?: ReactNode;
174
174
  cardFooter?: ReactNode;
175
+ getCurrentPage?: (page: number) => void;
175
176
  }
176
177
  export interface GroupedRowProps {
177
178
  item: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.744",
3
+ "version": "1.2.746",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",