API
ColumnResizer

ColumnResizer

type ColumnResizerConfig = {
  vertical: boolean;
  beforeApplyResizer?: (resizer: Resizer) => void;
};
 
class ColumnResizer {
  constructor(config: ColumnResizerConfig) {}
 
  init(container: HTMLElement | null): void;
  dispose(): void;
 
  getResizer(): Resizer;
  applyResizer(resizer: Resizer): void;
}

Use ColumnResizer to manage the column/row resizing behavior.

ColumnResizerConfig

vertical

type vertical = boolean;

Determine whether using vertical layout or not, default is false.

beforeApplyResizer

type beforeApplyResizer = (resizer: Resizer) => void;

Used to customize resize behavior. In this method, you don't need to call applyResizer to apply the resize result. Please note that you should not do any side effect on this method. If you want to do something after resizing, see afterResizing below.

ColumnResizer

getResizer

type getResizer = () => Resizer;

Used to get newest Resizer. But any change won't apply unless you pass the Resizer to applyResizer.

applyResizer

type applyResizer = (resizer: Resizer) => void;

Apply the passed Resizer to Container.

init

type init = (container: HTMLElement | null) => void;

Used to initiate ColumnResizer.

dispose

type dispose = () => void;

Used to clear ColumnResizer's event listeners.