vscode-edit-csv icon indicating copy to clipboard operation
vscode-edit-csv copied to clipboard

Column filtering

Open fubar-coder opened this issue 4 years ago • 2 comments

Version?

VS Code plugin

Feature

I'd like to use column filtering. Lets assume that I have a log file with a LogLevel column. It'd be nice to filter by Error. A nice additional feature would be that the addon keeps the same row/column selected even when I remove the filter to be able to see the rows surrounding the row where I previously found the Error.

Example:

Row Timestamp LogLevel Message
1 2020-10-27 01:00 Information Some information
1..100 many skipped lines
101 2020-10-27 02:00 Error Some error
102 2020-10-27 02:01 Information Some information

Filtering by Error:

Row Timestamp LogLevel (filtered) Message
101 2020-10-27 02:00 Error Some error

Select row 101

Row Timestamp LogLevel (filtered) Message
101 2020-10-27 02:00 Error Some error

Remove filter:

Row Timestamp LogLevel Message
1 2020-10-27 01:00 Information Some information
1..100 many skipped lines
101 2020-10-27 02:00 Error Some error
102 2020-10-27 02:01 Information Some information

Row 101 should remain selected and still be visible (in view).

Additional thoughts

It seems that this functionality is already in the excel viewer plugin, so I guess that it's not super important, but it would be very convenient. as the excel doesn't show row numbers by default (except when explicitly enabled by the csv-preview.lineNumbers setting).

EDIT: Added additional thoughts EDIT2: Updated information on the Excel Viewer line numbers

fubar-coder avatar Oct 27 '20 01:10 fubar-coder

I see this can be useful and it would be a nice feature. However, in handsontable 6.22 this is a pro feature meaning I would have to rebuild the whole functionality (which takes a lot of time). As you mentioned the Excel Viewer plugin already has this functionality. For now you are better off with Excel Viewer.

We can leave this open, maybe I'll do it in the future sometime.

janisdd avatar Oct 27 '20 17:10 janisdd

@fubar-coder The next update will bring multi column sorting. I think when you filter by LogLevel you will get all "Error" Rows. This also enables you to sort by "LogLevel" first and then by "timestamp" (to get a chronological view).

To sort by multiple columns you need to hold ctrl/cmd and click on the column(s).

janisdd avatar Nov 01 '20 11:11 janisdd