@mui/material#debounce JavaScript Examples

The following examples show how to use @mui/material#debounce. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TableViewContainer.js    From admin-web with GNU Affero General Public License v3.0 6 votes vote down vote up
render() {
    const { classes, children, baseRef, topbarTitle, handleScroll, headline, subtitle,
      snackbar, onSnackbarClose, href } = this.props;
    return (
      <div
        className={classes.root}
        onScroll={debounce(handleScroll || (() => null), 100)}
        id="scrollDiv"
      >
        <TopBar title={topbarTitle}/>
        <div className={classes.toolbar}></div>
        <div className={classes.base} ref={baseRef}>
          <Typography variant="h2" className={classes.pageTitle}>
            {headline}
            {href && <IconButton
              size="small"
              href={href}
              target="_blank"
            >
              <HelpOutline fontSize="small"/>
            </IconButton>}
          </Typography>
          {subtitle && <Typography variant="caption" className={classes.subtitle}>
            {subtitle}
          </Typography>}
          {children}
        </div>
        <Feedback
          snackbar={snackbar || ''}
          onClose={onSnackbarClose}
        />
      </div>
    );
  }