How to use the ra-core.setSidebarVisibility function in ra-core

To help you get started, we’ve selected a few ra-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marmelab / react-admin / packages / ra-ui-materialui / src / layout / Sidebar.js View on Github external
useEffect(() => {
        if (isDesktop) {
            dispatch(setSidebarVisibility(true)); // FIXME renders with a closed sidebar at first
        }
    }, [isDesktop, dispatch]);
    const open = useSelector(state => state.admin.ui.sidebarOpen);
github marmelab / react-admin / packages / ra-ui-materialui / src / layout / Sidebar.js View on Github external
    const toggleSidebar = () => dispatch(setSidebarVisibility(!open));
    const classes = useStyles({ open });
github marmelab / react-admin / packages / ra-ui-materialui / src / layout / Sidebar.js View on Github external
    const handleClose = () => dispatch(setSidebarVisibility(false));
    const toggleSidebar = () => dispatch(setSidebarVisibility(!open));