Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/fs 0.14.0 #610

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/vtable/__tests__/layout/pivot-header-layout.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// @ts-nocheck
// 有问题可对照demo unitTestListTable
import { PivotChart } from '../../src';
import * as VTable from '../../src';
import { createDiv, removeDom } from '../dom';
import VChart from '@visactor/vchart';
VTable.register.chartModule('vchart', VChart);
global.__VERSION__ = 'none';

const option = {
Expand Down Expand Up @@ -2572,7 +2574,7 @@ describe('pivot-header-layout test', () => {
containerDom.style.width = '500px';
containerDom.style.height = '500px';
option.container = containerDom;
const tableInstance = new PivotChart(option);
const tableInstance = new VTable.PivotChart(option);
const layout = tableInstance.internalProps.layoutMap;

test('pivot-header-layout column&row tree', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/data/DataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function getField(
table: BaseTableAPI,
promiseCallBack: PromiseBack
): FieldData {
if (record === null) {
if (record === null || record === undefined) {
return undefined;
}
if (isPromise(record)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/vtable/src/layout/pivot-header-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2629,7 +2629,7 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
for (const key in this.dataset.collectValuesBy) {
if (this.dataset.collectValuesBy[key].type === 'yField' && !this.dataset.collectValuesBy[key].range) {
collectedValues =
this.dataset.collectedValues[key][
this.dataset.collectedValues[key]?.[
path
.map(pathObj => {
return pathObj.value;
Expand Down Expand Up @@ -2662,7 +2662,7 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
for (const key in this.dataset.collectValuesBy) {
if (this.dataset.collectValuesBy[key].type === 'xField' && !this.dataset.collectValuesBy[key].range) {
collectedValues =
this.dataset.collectedValues[key][
this.dataset.collectedValues[key]?.[
path
.map(pathObj => {
return pathObj.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { computeRowsHeight } from '../../layout/compute-row-height';
import { createColGroup } from '../column';
import type { SceneProxy } from './proxy';

export async function createGroupForFirstScreen(
export function createGroupForFirstScreen(
cornerHeaderGroup: Group,
colHeaderGroup: Group,
rowHeaderGroup: Group,
Expand Down Expand Up @@ -216,6 +216,6 @@ export async function createGroupForFirstScreen(
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);

// 开始异步任务
await proxy.progress();
proxy.progress();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class SceneProxy {
this.rowUpdatePos = this.bodyBottomRow;
}

async createGroupForFirstScreen(
createGroupForFirstScreen(
cornerHeaderGroup: Group,
colHeaderGroup: Group,
rowHeaderGroup: Group,
Expand All @@ -152,7 +152,7 @@ export class SceneProxy {
xOrigin: number,
yOrigin: number
) {
await createGroupForFirstScreen(
createGroupForFirstScreen(
cornerHeaderGroup,
colHeaderGroup,
rowHeaderGroup,
Expand Down
Loading