How to use the table/helper.toggleEventListener function in table

To help you get started, we’ve selected a few table 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 youzan / zent / packages / zent / __tests__ / table / helper.js View on Github external
it('toggleEventListener', () => {
    const needFixBatchComps = { batchComponentsAutoFixed: true };
    const noNeedFixBatchComps = { batchComponentsAutoFixed: false };
    expect(
      helper.toggleEventListener(needFixBatchComps, needFixBatchComps)
    ).toEqual(undefined);
    expect(
      helper.toggleEventListener(needFixBatchComps, noNeedFixBatchComps)
    ).toEqual('removeEventListener');
    expect(
      helper.toggleEventListener(noNeedFixBatchComps, needFixBatchComps)
    ).toEqual('addEventListener');
  });
});
github youzan / zent / packages / zent / __tests__ / table / helper.js View on Github external
it('toggleEventListener', () => {
    const needFixBatchComps = { batchComponentsAutoFixed: true };
    const noNeedFixBatchComps = { batchComponentsAutoFixed: false };
    expect(
      helper.toggleEventListener(needFixBatchComps, needFixBatchComps)
    ).toEqual(undefined);
    expect(
      helper.toggleEventListener(needFixBatchComps, noNeedFixBatchComps)
    ).toEqual('removeEventListener');
    expect(
      helper.toggleEventListener(noNeedFixBatchComps, needFixBatchComps)
    ).toEqual('addEventListener');
  });
});
github youzan / zent / packages / zent / __tests__ / table / helper.js View on Github external
it('toggleEventListener', () => {
    const needFixBatchComps = { batchComponentsAutoFixed: true };
    const noNeedFixBatchComps = { batchComponentsAutoFixed: false };
    expect(
      helper.toggleEventListener(needFixBatchComps, needFixBatchComps)
    ).toEqual(undefined);
    expect(
      helper.toggleEventListener(needFixBatchComps, noNeedFixBatchComps)
    ).toEqual('removeEventListener');
    expect(
      helper.toggleEventListener(noNeedFixBatchComps, needFixBatchComps)
    ).toEqual('addEventListener');
  });
});