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

[Feature] vtable-vue的dataConfig配置项totals动态变更,如何更新,目前不会主动渲染 #3308

Open
jiliangmason opened this issue Jan 10, 2025 · 3 comments
Labels
feature 新需求

Comments

@jiliangmason
Copy link

What problem does this feature solve?

vtable-vue的dataConfig配置项totals动态变更,如何更新,目前不会主动渲染
<PivotTable :options="tableOptions" :records="records" ref="pivotTableRef">

其中tableOptions的dataConfig如下:
dataConfig: { totals: { row: { showGrandTotals: true, showSubTotals: false, subTotalsDimensions: [], grandTotalLabel: 'Row Totals', subTotalLabel: 'Sub Totals' }, column: { showGrandTotals: true, // 总合计列 showSubTotals: true, // 组内合计列 subTotalsDimensions: ['Region'], grandTotalLabel: 'Column Totals', subTotalLabel: 'Sub Totals' } } },

点击事件动态修改showGrandTotals的值,发现vtable不会主动更新,尝试使用vtable实例提供的updateOption并未生效

const handleClick = () => { const show = tableOptions.value.dataConfig.totals.row.showGrandTotals tableOptions.value.dataConfig.totals.row.showGrandTotals = !show }

What does the proposed API look like?

期望可以提供一个update方法可以主动更新图表,update(option) option为当前的option

@jiliangmason jiliangmason added the feature 新需求 label Jan 10, 2025
@fangsmile
Copy link
Contributor

可以仿照接口:https://visactor.io/vtable/api/Methods#updateSortRules

感谢你的反馈!我们已经收到你的问题,并将在后续进行处理。
如果有开发者对这个 issue 感兴趣,请在issue下方留言“认领该issue”,留言后开始你的创作提pr给我们!
欢迎大家参与开源共建!我们非常感激每一位贡献者,提交pr后我们将为参与共建的开发者准备一份礼品。
参与共建可参考:https://visactor.io/vtable/guide/Contribution_Guide
与官方开发者交流问题可以下载飞书app扫码加入飞书群:
飞书20241029-170312
再次感谢你的支持!

Thank you for your feedback! We have received your question and will deal with it later.
If any developer is interested in this issue, please leave a message "claim this issue" below the issue. Welcome to participate in open source co-construction!
We are very grateful to every contributor. After submitting the PR, we will prepare a gift for the developers who participated in the co-construction.
For participation in co-construction, please refer to: https://visactor.io/vtable/guide/Contribution_Guide
To communicate with official developers, you can download the Feishu app and scan the QR code to join the Feishu group!
Thank you again for your support!

@jiliangmason
Copy link
Author

可以仿照接口:https://visactor.io/vtable/api/Methods#updateSortRules

感谢你的反馈!我们已经收到你的问题,并将在后续进行处理。 如果有开发者对这个 issue 感兴趣,请在issue下方留言“认领该issue”,留言后开始你的创作提pr给我们! 欢迎大家参与开源共建!我们非常感激每一位贡献者,提交pr后我们将为参与共建的开发者准备一份礼品。 参与共建可参考:https://visactor.io/vtable/guide/Contribution_Guide 与官方开发者交流问题可以下载飞书app扫码加入飞书群: 飞书20241029-170312 再次感谢你的支持!

Thank you for your feedback! We have received your question and will deal with it later. If any developer is interested in this issue, please leave a message "claim this issue" below the issue. Welcome to participate in open source co-construction! We are very grateful to every contributor. After submitting the PR, we will prepare a gift for the developers who participated in the co-construction. For participation in co-construction, please refer to: https://visactor.io/vtable/guide/Contribution_Guide To communicate with official developers, you can download the Feishu app and scan the QR code to join the Feishu group! Thank you again for your support!

目前api并没有提供可以更新dataConfig的update方法

@fangsmile
Copy link
Contributor

我的意思是可以提pr贡献代码 @jiliangmason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 新需求
Projects
None yet
Development

No branches or pull requests

2 participants