@applica-software-guru/react-admin 1.5.306 → 1.5.307
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/components/Layout/Sidebar/Drawer.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +35 -35
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +3010 -3010
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +35 -35
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Layout/Sidebar/Drawer.tsx +1 -5
- package/src/components/ra-lists/FilterSidebar/FilterSidebar.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Drawer as MUIDrawer, useMediaQuery, useTheme } from '@mui/material';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import { useSx } from '@/hooks';
|
|
4
|
-
import { useListViewContext } from '@/components/ra-lists';
|
|
5
4
|
import { isFunction } from 'lodash';
|
|
6
5
|
|
|
7
6
|
type DrawerProps = {
|
|
@@ -18,14 +17,11 @@ function Drawer(props: DrawerProps) {
|
|
|
18
17
|
const theme = useTheme();
|
|
19
18
|
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
|
|
20
19
|
const anchorPosition = isMobile ? 'bottom' : anchor;
|
|
21
|
-
const { setSidebarOpen } = useListViewContext();
|
|
22
20
|
const handleClose = useCallback(() => {
|
|
23
21
|
if (isFunction(onClose)) {
|
|
24
22
|
onClose();
|
|
25
|
-
} else if (isFunction(setSidebarOpen)) {
|
|
26
|
-
setSidebarOpen(false);
|
|
27
23
|
}
|
|
28
|
-
}, [onClose
|
|
24
|
+
}, [onClose]);
|
|
29
25
|
const sx = useSx(PaperProps ?? {}, {
|
|
30
26
|
backgroundImage: 'none',
|
|
31
27
|
boxShadow: '-10px 4px 42px 0px rgba(0, 0, 0, 0.25)',
|
|
@@ -115,7 +115,7 @@ function FilterSidebar(props: FilterSidebarProps): ReactElement {
|
|
|
115
115
|
}, [values, getValues, watchValues]);
|
|
116
116
|
|
|
117
117
|
return (
|
|
118
|
-
<Sidebar PaperProps={{ sx: { height: '100%' } }} open={sidebarOpen}>
|
|
118
|
+
<Sidebar PaperProps={{ sx: { height: '100%' } }} open={sidebarOpen} onClose={closeSidebar}>
|
|
119
119
|
<Sidebar.Header>
|
|
120
120
|
<Sidebar.HeaderText primary={translate('ra.action.add_filter')} />
|
|
121
121
|
<Sidebar.HeaderAction>
|