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

🤔 #2298

Closed
1 task
HJG20201314 opened this issue Jul 26, 2023 · 2 comments
Closed
1 task

🤔 #2298

HJG20201314 opened this issue Jul 26, 2023 · 2 comments
Labels
❔question 疑问/使用问题

Comments

@HJG20201314
Copy link

🏷 Version

Package Version
@antv/s2 1.45.1

Sheet Type

  • TableSheet

🖋 Description

表格滚动条拖动,会出现卡顿掉帧;但是在缩放浏览器恢复之后又很丝滑

🔗 Reproduce Link

样例代码:
`
import { TableSheet } from "@antv/s2";

const randomStr = (length, chars) => {
length = length || 6
chars = chars || '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
var result = ''
for (var i = length; i > 0; --i) {
result += chars[Math.floor(Math.random() * chars.length)]
}
return result
}
const generateRawData = () => {
let columns = generateColumnsData()
let res = []
for (let r = 0; r < 1000; r++) {
let obj = {}
for (let i = 0; i < columns.length; i++) {
obj[columns[i]] = randomStr(8)
}
res.push(obj)
}
return res
}

const generateColumnsData = () => {
let columns = []
for (let i = 1; i <= 200; i++) {
columns.push(column-${i})
}
return columns
}

const s2Options = {
width: 1700,
height: 600,
showSeriesNumber: true,
}

const s2DataConfig = {
fields: {
columns: generateColumnsData() ,
},
data: generateRawData(),
}

const rootElement = document.getElementById("root");

const s2 = new TableSheet(rootElement, s2DataConfig, s2Options);

s2.render();
`

😊 Expected Behavior

滚动条拖拽不开洞,或者开放出懒加载渲染是否开启的 API

😅 Current Behavior

s2-1
滚动条拖拽卡顿
s2-2
浏览器缩放一下后,拖拽很丝滑

@HJG20201314 HJG20201314 added the ❔question 疑问/使用问题 label Jul 26, 2023
@github-actions
Copy link
Contributor

你好 @HJG20201314,请编辑你的 issue 标题, 一个言简意赅的 issue 标题可以节省大家的时间, 请不要将标题当做正文, 或者为空。

Hello, @HJG20201314, please edit your issue title. a concise issue title will save everyone time. please do not leave the title as the body or empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❔question 疑问/使用问题
Projects
None yet
Development

No branches or pull requests

1 participant