How to use the dom-lib.scrollLeft function in dom-lib

To help you get started, we’ve selected a few dom-lib 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 rsuite / rsuite-table / src / Table.js View on Github external
handleBodyScroll = (event: SyntheticTouchEvent<*>) => {
    if (event.target !== this.tableBody) {
      return;
    }

    let left = scrollLeft(event.target);
    let top = scrollTop(event.target);

    if (top === 0 && left === 0) {
      return;
    }

    this._listenWheel(left, top);

    scrollLeft(event.target, 0);
    scrollTop(event.target, 0);
  };
github rsuite / rsuite-table / src / Table.js View on Github external
handleBodyScroll = (event: SyntheticTouchEvent<*>) => {
    if (event.target !== this.tableBody) {
      return;
    }

    let left = scrollLeft(event.target);
    let top = scrollTop(event.target);

    if (top === 0 && left === 0) {
      return;
    }

    this._listenWheel(left, top);

    scrollLeft(event.target, 0);
    scrollTop(event.target, 0);
  };