-
Support QuestionHi, I was wondering if it’s possible to render custom HTML elements inside the table cells, such as Right now, the data is rendered directly inside elements. Is there a way to override or customize this behavior so that I can include elements like:
Currently, we are using the “addEventListener” to display an Does this approach make sense, or is there a better way to do it within the library’s existing functionality? Thanks for your time. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
This approach is fine and should perform well, especially if the HTML content you want to embed is simple (like an Note that if you do this for expensive elements, you'll want to be careful smartly caching-re-using these physical DOM elements as the users' viewport moves. Otherwise you may introduce flickering or a frame-rate degradation. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the delay in replying. |
Beta Was this translation helpful? Give feedback.
This approach is fine and should perform well, especially if the HTML content you want to embed is simple (like an
<a>tag). You may optionally returnHTMLElementvalues (not HTML string text, but theHTMLElementobjects themselves) directly as data in yoursetDataListenercallback, which can help optimize HTML content which is expensive to mount/dismount, or which causes undue layout thrashing when mounting.Note that if you do this for expensive elements, you'll want to be careful smartly caching-re-using these physical DOM elements as the users' viewport moves. Otherwise you may introduce flickering or a frame-rate degradation.