Skip to content

Commit

Permalink
fix table issue in reactgeoda
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Li <[email protected]>
  • Loading branch information
lixun910 committed Jan 6, 2024
1 parent 524f1bd commit 2c2a1b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/src/common/data-table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import styled, {withTheme} from 'styled-components';
import classnames from 'classnames';
import {createSelector} from 'reselect';
import get from 'lodash.get';
import debounce from 'lodash.debounce';
// import debounce from 'lodash.debounce';
import {ArrowDown} from '../icons';

import {CellSizeCache} from './cell-size';
Expand Down Expand Up @@ -485,7 +485,7 @@ function DataTableFactory(HeaderCell: ReturnType<typeof HeaderCellFactory>) {
this.setState(this.getCellSizeCache());
};

scaleCellsToWidth = debounce(this.doScaleCellsToWidth, 300);
scaleCellsToWidth = this.doScaleCellsToWidth;

renderDataCell = (columns, isPinned, props: DataTableProps) => {
const getRowCell = this.props.getRowCell ?? defaultGetRowCell;
Expand Down Expand Up @@ -600,6 +600,7 @@ function DataTableFactory(HeaderCell: ReturnType<typeof HeaderCellFactory>) {
<Container
className="data-table-container"
ref={this.root}
theme={theme}
hasCustomScrollBarStyle={hasCustomScrollBarStyle}
>
{Object.keys(cellSizeCache).length ? (
Expand Down
2 changes: 2 additions & 0 deletions src/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ export {default as VerticalToolbar} from './common/vertical-toolbar';
export {default as ToolbarItem} from './common/toolbar-item';
export {default as ShareMapUrlModalFactory, SharingUrl} from './modals/share-map-modal';
export {default as TippyTooltip} from './common/tippy-tooltip';
export {renderedSize} from './common/data-table/cell-size';
export type {DataTableProps} from './common/data-table';

// side pane components
export {default as LayerTypeSelectorFactory} from './side-panel/layer-panel/layer-type-selector';
Expand Down

0 comments on commit 2c2a1b5

Please sign in to comment.