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]: Grid组件,针对普通数据表格的大数据场景(非树表虚拟滚动),启动虚拟滚动后,偶现数据源更新后不渲染新视图,而是展示‘’暂无数据“ #2005

Open
tuoqiang opened this issue Aug 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@tuoqiang
Copy link

Version

"@opentiny/vue": "3.16.0",

Vue Version

"vue": "3.4.29",

Link to minimal reproduction

模板如下:
<tiny-grid
v-bind="$attrs"
:height="height"
:data="dataSources"
:loading="firstScreenLoading"
ref="tinyTableRef"
... ...
>
...

主要js伪代码如下:

// 虚拟滚动的配置参数为:
const optimizationDataLocal = {
animat: false,
delayHover: 1000,
scrollX: {
gt: 100,
oSize: 2,
rSize: 10,
vSize: 10,
},
scrollY: {
gt: 10,
oSize: 2,
rHeight: 40,
adaptive: true,
},
}

const dataSources: any = ref([]); // 定义数据源
const index = 5 // 随便一个索引位置
const data = await fetch(params); // 通过接口拿到新数据
dataSource.value = [...dataSources.value.slice(0, index + 1), ...data]; // 这里给dataSource.value赋新值,但是视图不更新,直接展示‘暂无数据’

</script>

Step to reproduce

Grid组件,针对普通数据表格的大数据场景(非树表虚拟滚动),启动虚拟滚动后,向下滚动几屏后,再给组件的:data="dataSources"数据源dataSources中添加几个新的成员数据,偶先视图不会更新渲染,直接会渲染empty插槽‘暂无数据’。

What is expected

No response

What is actually happening

No response

What is your project name

Industrial Public Platform System

Any additional comments (optional)

No response

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: Grid component, for big data scenarios of ordinary data tables (non-tree table virtual scrolling), after starting virtual scrolling, occasionally the new view is not rendered after the data source is updated, but is displayed ''No data yet"

@kagol kagol added the bug Something isn't working label Aug 30, 2024
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

No branches or pull requests

3 participants