Skip to content

Commit

Permalink
release version canary
Browse files Browse the repository at this point in the history
  • Loading branch information
radubrehar committed Sep 27, 2024
1 parent 671d92a commit a35cbed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rebuild-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
7 changes: 3 additions & 4 deletions source/src/components/DataSource/getDataSourceApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
DataSourceSingleSortInfo,
DataSourceState,
} from '.';
import { raf } from '../../utils/raf';
import { InfiniteTableRowInfo } from '../InfiniteTable/types';
import { DataSourceCache } from './DataSourceCache';
import { getRowInfoAt, getRowInfoArray } from './dataSourceGetters';
Expand Down Expand Up @@ -56,7 +55,7 @@ class DataSourceApiImpl<T> implements DataSourceApi<T> {
private getState: () => DataSourceState<T>;
private actions: DataSourceComponentActions<T>;
//@ts-ignore
private batchOperationRafId: number = 0;
private batchOperationRafId: any = 0;
//@ts-ignore
private batchOperationTimeoutId: any = 0;

Expand All @@ -81,12 +80,12 @@ class DataSourceApiImpl<T> implements DataSourceApi<T> {
const delay = Math.max(0, this.getState().batchOperationDelay ?? 0);

if (delay === 0) {
this.batchOperationRafId = raf(() => {
this.batchOperationRafId = setTimeout(() => {
this.commit();
});
} else {
this.batchOperationTimeoutId = setTimeout(() => {
this.batchOperationRafId = raf(() => {
this.batchOperationRafId = setTimeout(() => {
this.commit();
});
}, delay);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ function lazyLoadRange<T>(
] = [componentState.data, componentState, componentActions, fnCall];

// TODO make this whole function testable, so we can properly test multiple calls are not issued for the same batch (in the same group)

// TODO should replace raf with setTimeout
return promise.then(() => getRafPromise()).then(() => loadData(...args));
}, initialPromise);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { join } from '../../../../utils/join';
import { decamelize } from '../../../utils/decamelize';
import { ThemeVars } from '../../vars.css';
import { FooterCls } from '../../InfiniteCls.css';
import { raf } from '../../../../utils/raf';

const defaultStyle: React.CSSProperties = {
padding: ThemeVars.spacing[2],
Expand Down Expand Up @@ -65,7 +64,7 @@ export const InfiniteTableLicenseFooter = React.forwardRef(

useEffect(() => {
const forceStyle = () => {
raf(() => {
setTimeout(() => {
enforceStyle(domRef.current, defaultStyle);
enforceStyle(
domRef.current?.firstElementChild as HTMLElement | null,
Expand Down

0 comments on commit a35cbed

Please sign in to comment.