pro-components
pro-components copied to clipboard
๐ง[้ฎ้ข] Please find the reset button click event in the column setting in the setting in the option in the pro table.
ๆ้ฎๅๅ ็็๏ผ
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
๐ง ้ฎ้ขๆ่ฟฐ
I would like to register another onclick event for the option initialization button. Is there a way?
๐ป ็คบไพไปฃ็
๐ ๅ ถไปไฟกๆฏ
I also need this event. We store the structure of tables in the backend on a per user basis. When they reset it, we want it to reset to the system default. I think it should be possible to insert an event listener (onXXReset) here: https://github.com/ant-design/pro-table/blob/df4fc21be7fc3b1060715920ca73765f0abaac26/src/component/columnSetting/index.tsx#L274
Actually, maybe it's not even necessary. You have the option to pass in extra elements to settings. I will pass a button in with my desired event-listener attached.
export type SettingOptionType = { draggable?: boolean; checkable?: boolean; showListItemOption?: boolean; checkedReset?: boolean; listsHeight?: number; extra?: React.ReactNode; children?: React.ReactNode; settingIcon?: React.ReactNode; };