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

[Bug] widthMode: 'adaptive'在连续setRecords时拖动列宽计算错误 #796

Closed
jickchen34 opened this issue Dec 25, 2023 · 1 comment · Fixed by #822
Closed

[Bug] widthMode: 'adaptive'在连续setRecords时拖动列宽计算错误 #796

jickchen34 opened this issue Dec 25, 2023 · 1 comment · Fixed by #822
Assignees
Labels
bug Something isn't working

Comments

@jickchen34
Copy link

Version

0.17.2

Link to Minimal Reproduction

https://visactor.io/vtable/demo/basic-functionality/width-mode-adaptive

Steps to Reproduce

https://visactor.io/vtable/demo/basic-functionality/width-mode-adaptive
let tableInstance;
fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_data.json')
.then((res) => res.json())
.then((data) => {

const columns =[
{
"field": "Order ID",
"title": "Order ID",
"width": "auto"
},
{
"field": "Customer ID",
"title": "Customer ID",
"width": "auto"
},
{
"field": "Product Name",
"title": "Product Name",
"width": "auto"
},
{
"field": "Category",
"title": "Category",
"width": "auto"
},
{
"field": "Sub-Category",
"title": "Sub-Category",
"width": "auto"
},
{
"field": "Region",
"title": "Region",
"width": "auto"
},
{
"field": "City",
"title": "City",
"width": "auto"
},
{
"field": "Order Date",
"title": "Order Date",
"width": "auto"
},
{
"field": "Quantity",
"title": "Quantity",
"width": "auto"
},
{
"field": "Sales",
"title": "Sales",
"width": "auto"
},
{
"field": "Profit",
"title": "Profit",
"width": "auto"
}
];

const option = {
records:data,
columns,
widthMode: 'adaptive'
};
setInterval(()=>{
tableInstance.setRecords(data)
},1000)
tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID),option);
window['tableInstance'] = tableInstance;
})

Current Behavior

widthMode: 'adaptive'在连续setRecords时拖动列宽计算错误

Expected Behavior

widthMode: 'adaptive'在连续setRecords时拖动列宽计算正确

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@jickchen34 jickchen34 added the bug Something isn't working label Dec 25, 2023
@fangsmile
Copy link
Contributor

连续setRecords时拖动列宽 这个交互过程是什么样子的呀

@fangsmile fangsmile self-assigned this Dec 28, 2023
@fangsmile fangsmile linked a pull request Dec 29, 2023 that will close this issue
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants