[英]Tabulator: Top and button calc not shifting position when a column is toggled. How to toggle column and refresh table without losing scroll position?
My goal is to be able to toggle the visibity of toggles and keep the same formatting.我的目标是能够切换开关的可见性并保持相同的格式。 Currently my solution to use a filter does this but loses the current scroll position of the tabulator.
目前,我使用过滤器的解决方案会执行此操作,但会丢失制表符的当前滚动位置。 This is unaccepatable.
这是不可接受的。
$("#toggleNotes").change(function () {
// Toggles the visibility of the Notes column.
$("#allocations-table").tabulator("toggleColumn", "Notes");
$("#allocations-table").tabulator("setFilter", "AllocationId", ">", -1);
});
Not using the filter results in the top and bottom calc not shifting to accomadate the new column.不使用过滤器会导致顶部和底部计算不会移动以适应新列。 Is it possible to shift the top and bottom calc?
是否可以移动顶部和底部计算? Is there a way to recalculate column top and bottom calc without reseting the table each time?
有没有办法重新计算列顶部和底部计算而无需每次都重置表格?
I am using tabulator 3.5 and I am unable to upgrade to the latest version.我使用的是 tabulator 3.5,但无法升级到最新版本。
PS: Thanks for making the tabulator free. PS:感谢您免费提供制表器。
Even performance changed on v4.9 but some problems remain or produced.The bottom/top calc
have problem even on version 4.9 when it comes to horizontal scroll.即使在 v4.9 上性能发生了变化,但仍然存在或产生了一些问题。在水平滚动方面,即使在 4.9 版上,
bottom/top calc
也有问题。 Also there is problems with RTL languages
. RTL languages
也存在问题。 I have attached a sample image of sample table generated with Tabulator 4.9
.我附上了用
Tabulator 4.9
生成的示例表的示例图像。 For Example if we active Frozen Column and same time set direction to RTL, the frozen row floating to the left while it should be fixed on the right side of table.例如,如果我们激活 Frozen Column 并同时将方向设置为 RTL,则冻结行向左浮动,而应固定在表的右侧。 I have fixed soring carret position on my custom css easily,but others are remained yet.
我已经很容易地在我的自定义 css 上固定了刺痛的 carret 位置,但其他人还没有。
These are only some problems on first hours of working with Tabulator new version.这些只是使用 Tabulator 新版本的第一个小时的一些问题。
It's a bug in Tabulator.这是 Tabulator 中的一个错误。 If you scroll, it causes a redraw which moves the bottom or top calc row to the correct position.
如果滚动,它会导致重绘,将底部或顶部 calc 行移动到正确的位置。 You can force it by shifting the scroll position.
您可以通过移动滚动位置来强制它。
cell.getElement().closest('.tabulator-tableHolder').scrollLeft += 1;
You will need to upgrade to a newer version of Tabulator to overcome those limitations.您需要升级到较新版本的 Tabulator 才能克服这些限制。 version 4.6 is the current version
版本 4.6 是当前版本
Tabulator 4 does come with a jQuery Wrapper so you can continue using it just as before. Tabulator 4 确实带有一个jQuery Wrapper,因此您可以像以前一样继续使用它。 and the docs have a step by step Upgrade Guide to take you through making the changes.
并且文档有分步升级指南,可引导您完成更改。
I have upgraded sites with hundreds of tables and it has taken between a few minutes and a few hours depending on complexity of the tables我已经升级了数百张桌子的网站,根据桌子的复杂程度,它需要几分钟到几个小时
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.