Currently, we are using DataTables in the WebView as the data viewer with session watcher enabled. It has the following capabilities (but we are not using all of them at the moment):
There are some alternative data viewer widgets that could provide more power features such as column filtering by value or range (like in RStudio), multi-column ordering. I guess we could investigate into this and see if we could provide a more powerful data viewer.
More powerful alternatives:
@renkun-ken if the viewer could honor light+dark or the vscode theme it would be incredible. it's a bit blinding cracking it open at night
As the related work, vscode-jupyter implements similar function by the react and tsx.
Imitating it is cost, but safe for the license issue.
@Ikuyadeu I support the idea of porting the vscode-jupyter data viewer. I filed a related issue in vscode-jupyter: https://github.com/microsoft/vscode-jupyter/issues/4604
When I run View(mtcars) in a Jupyter notebook in VS Code Insiders, I get the following error:
ERROR: Error in View(mtcars): 'View()' not yet supported in the Jupyter R kernel
My hope is that the 'not yet' in the error implies that adding R support for the data viewer could already be a priority for vscode-jupyter, in which case porting to vscode-R may be significantly easier if R data structures have already been specified.
For anyone who has not yet done so, I would encourage you to upvote R here: https://github.com/microsoft/vscode-jupyter/issues/1536
To follow up on the issue I raised in vscode-jupyter, this very helpful response from a Microsoft employee points to two files that might be a useful starting point: https://github.com/microsoft/vscode-jupyter/issues/4604#issuecomment-772043821
The data viewer of SQL Tools looks good too. The source seems to be at https://github.com/mtxr/vscode-sqltools/blob/master/packages/vscode/webview-provider/index.ts.

From https://github.com/mtxr/vscode-sqltools/blob/master/packages/plugins/package.json, it uses DevExpress/devextreme-reactive.
@renkun-ken you might want to try canvas based grids:
https://github.com/TonyGermaneri/canvas-datagrid
https://github.com/fin-hypergrid/core
Handsontable looks really good, but I am not sure their licensing is suitable for vscode extensions needs.
Most helpful comment
@renkun-ken if the viewer could honor light+dark or the vscode theme it would be incredible. it's a bit blinding cracking it open at night