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
版权声明:本文标题:typescript - How to extend autoWidthCalculator bean or any other beans in ag grid? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741319730a2372134.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论