Skip to content

Commit

Permalink
[revert] rename setAutoRowHeight back to recalculateRowHeight
Browse files Browse the repository at this point in the history
- lineCount in elastic#5284 will shortly be using the row height cache in addition to auto, so I'm making the fn name less specific again
  • Loading branch information
cee-chen committed Oct 25, 2021
1 parent 1e3ded2 commit f254b77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/datagrid/body/data_grid_cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export class EuiDataGridCell extends Component<
}
};

setAutoRowHeight = () => {
recalculateRowHeight = () => {
const { rowHeightUtils, rowHeightsOptions, rowIndex } = this.props;
if (
this.cellContentsRef &&
Expand Down Expand Up @@ -236,7 +236,7 @@ export class EuiDataGridCell extends Component<
}

componentDidUpdate(prevProps: EuiDataGridCellProps) {
this.setAutoRowHeight();
this.recalculateRowHeight();

if (this.props.columnId !== prevProps.columnId) {
this.setCellProps({});
Expand Down Expand Up @@ -290,7 +290,7 @@ export class EuiDataGridCell extends Component<
setCellContentsRef = (ref: HTMLDivElement | null) => {
this.cellContentsRef = ref;
if (ref && hasResizeObserver) {
this.contentObserver = this.observeHeight(ref, this.setAutoRowHeight);
this.contentObserver = this.observeHeight(ref, this.recalculateRowHeight);
} else if (this.contentObserver) {
this.contentObserver.disconnect();
}
Expand Down

0 comments on commit f254b77

Please sign in to comment.