GithubHelp home page GithubHelp logo

Comments (3)

Sight-wcg avatar Sight-wcg commented on July 19, 2024 2

@sentsim 深重载可以解决问题。之前没有确定原因,所以临时去除了 BUG 标签,调试后确认是 BUG,treeTable data 模式非深度重载时,如果 reload 参数中没有 data 选项,会用一个空数组重新初始化缓存。

@hawkxu 感谢您的反馈,确认是 BUG

from layui.

sentsim avatar sentsim commented on July 19, 2024

这可能是由于 treeTable 选项结构的特殊性所致。
treeTable.reloadData 默认使用的是浅重载,若需携带旧的属性,可尝试设置为深重载。

treeTable.reloadData("tree-id",  {data: []}, true);

from layui.

hawkxu avatar hawkxu commented on July 19, 2024

这可能是由于 treeTable 选项结构的特殊性所致。 treeTable.reloadData 默认使用的是浅重载,若需携带旧的属性,可尝试设置为深重载。

treeTable.reloadData("tree-id",  {data: []}, true);

仅探讨:
我遇到这个问题的背景是,我把树表放在选项卡组件中,并通过height回调使树表的高度占满选项卡,当点击选项卡标签切换时,树表的高度会收缩不再占满选项卡(树表数据较少时)。此时使用reloadData不能重设高度,我只能调用reload方法。

另,数据表table组件也有同样的情况。

from layui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.