@applica-software-guru/react-admin 1.5.306 → 1.5.307-alpha.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/style.css.gz CHANGED
Binary file
package/package.json CHANGED
@@ -107,5 +107,5 @@
107
107
  "type": "module",
108
108
  "types": "dist/index.d.ts",
109
109
  "typings": "dist/index.d.ts",
110
- "version": "1.5.306"
110
+ "version": "1.5.307-alpha.0"
111
111
  }
@@ -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, setSidebarOpen]);
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>