-
-
Notifications
You must be signed in to change notification settings - Fork 734
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] Can you add a configuration interface for the pivot table? #4622
Comments
Origin Title: [Feature] 数据透视表能否添加一个设置config接口 Title: [Feature] Can you add a configuration interface for the pivot table? Initial List
questionPivotTable has a getconfig API. Can you create a setconfig API? Set the getconfig data back to restore the pivotTable. It is too troublesome to use the existing addField to restore the pivotTable. |
@Gdutyong Do you need config the fields in pivot table or the pivot table soure both?
I think is may be not a easy way for you to understand it, because there many ids need to match. can you use code or interface show what you want? |
just want restore fieldsConfig,because user select fields and want to restore next time. |
Maybe a clone config is useful for you , but it I think a reset api you also need, to ensure you pivot table is empty, as you know a same field in row or col may make mistake. A api like following may be works: pivotTable.reset();
pivotTable.setFieldsConfig(fieldsConfig); |
/**
* @description Set the pivot table fields config.It will add fields to the pivot table from provided config.Before setting the fields config, you should ensure the pivot table is empty to avoid the conflict.
* @param {IPivotTableConfig['fieldsConfig']} config The pivot table fields config.
* @returns {Promise<boolean>} Whether the pivot table fields config is set successfully.
*/
setFieldsConfig(config: IPivotTableConfig['fieldsConfig']): Promise<boolean>;
/**
* @description Clear the fields by provided field area or clear all fields.
* @param {PivotTableFiledAreaEnum} [resetArea] The area of the field to reset or undefined to reset all fields.
* @returns {Promise<boolean>} Whether the pivot table fields are reset successfully.
*/
reset(resetArea?: PivotTableFiledAreaEnum): Promise<boolean> |
The code has merged, and you can get it next version (after 0.6.1) |
thank you! |
初始清单
问题
数据透视表pivotTable有个getconfig api,能否出个setconfig api,直接把getconfig的数据设置回去来复原pivotTable,用已有的addField来复原pivotTable太麻烦了
The text was updated successfully, but these errors were encountered: