Skip to content

VirtualTable scroll.x warning #1892

@junhaoliao

Description

@junhaoliao

Bug

When running in dev server mode, the Jobs table on the Ingest page emits a console warning:

Warning: `scroll.x` in virtual table must be number.

This occurs because scroll={{y: 400, x: true}} is passed to VirtualTable, but rc-table's VirtualTable only accepts numbers for scroll.x (unlike the regular Table which accepts number | true | string).

<VirtualTable<JobData>
className={styles["jobs"] || ""}
columns={jobColumns}
dataSource={jobs}
pagination={false}
rowKey={(record) => record.key}
scroll={{y: 400, x: true}}
tableLayout={"fixed"}/>

The line was changed in PR #1798 .

Potential fix: Change x: true to x: 1 (the value rc-table falls back to internally).

CLP version

69ed117

Environment

Any environment running the webui client in development mode (warning only appears when NODE_ENV !== 'production').

Reproduction steps

  1. Run the webui in development mode
  2. Navigate to the Ingest page
  3. Open browser console
  4. Observe the warning: scroll.x in virtual table must be number.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions