@m4l/components 9.1.109 → 9.1.111
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,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initializes Mock Service Worker (MSW) for Storybook
|
|
3
|
+
*
|
|
4
|
+
* MSW is used to intercept and mock network requests during development and testing.
|
|
5
|
+
* This initialization configures MSW to work with Storybook's environment.
|
|
6
|
+
*
|
|
7
|
+
* Configuration details:
|
|
8
|
+
* - Sets up the service worker with the correct path based on the environment
|
|
9
|
+
* - Handles unhandled requests by bypassing them
|
|
10
|
+
* - Configures the service worker scope
|
|
11
|
+
*
|
|
12
|
+
* Environment-specific paths:
|
|
13
|
+
* - Development: /mockServiceWorker.js
|
|
14
|
+
* - Review (MR): /{library_name}/{branch_name}/mockServiceWorker.js
|
|
15
|
+
*
|
|
16
|
+
* The path is determined by the VITE_STORYBOOK_BASE_PATH environment variable:
|
|
17
|
+
* - If set, prepends the value to the service worker path
|
|
18
|
+
* - If not set, uses the root path
|
|
19
|
+
* @see https://github.com/mswjs/msw-storybook-addon#configuring-msw
|
|
20
|
+
*/
|
|
21
|
+
export declare const initializeMSW: () => void;
|
|
@@ -87,7 +87,12 @@ const CustomTablePagination = (props) => {
|
|
|
87
87
|
count: countTotal,
|
|
88
88
|
page: currentPage,
|
|
89
89
|
rowsPerPage: localRowsPerPage,
|
|
90
|
-
onPageChange: (
|
|
90
|
+
onPageChange: (event, newPage) => {
|
|
91
|
+
setLocalPage(newPage);
|
|
92
|
+
if (onPageChange) {
|
|
93
|
+
onPageChange(event, newPage);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
91
96
|
}
|
|
92
97
|
)
|
|
93
98
|
] })
|
package/package.json
CHANGED
|
File without changes
|