admin管理员组

文章数量:1287970

The main question:
How to extend a bean in ag-grid and how to override a bean using the extended one?


Here is the detail:
I'm facing a problem with auto size column width action in ag-grid when custom web components written in stencil framework are used in cell renderer. It appears that in autoWidthCalculator bean, a form element is created and contents of each column are added to that form then largest width is calculated using offset property of that form. see this link from ag grid repo.since stencil components use virtual dom, it needs time to re-render its content and since all functions are written to be compatible with number and not Promise, there is no way to wait asynchronously.


Workaround: I come up with a solution to use animationFrameService before removing columns content, which waits busily for about one frame and then calculate the width of form elements. so I need to extend and override autoWidthCalculator bean. any help would be appreciated.

本文标签: typescriptHow to extend autoWidthCalculator bean or any other beans in ag gridStack Overflow