janisdd / vscode-edit-csv

vs code extension to edit csv files with an excel like table ui
MIT License
212 stars 30 forks source link

Cell when focused is not saved (after pressing CTRL+S) to the actual CSV file #80

Closed mkloar closed 2 years ago

mkloar commented 2 years ago

What OS?

Version?

Description

While editing the column in the CSV and when column (or data) is focused, the editor then is not storing the column into the actual CSV file (after pressing CTRL+S keyboard combination).

Expected behavior

When the column is focused and after pressing CTRL+S, the column should be stored in the actual CSV file.

Steps to reproduce

  1. Open VSCode
  2. Open any CSV
  3. Press "Edit csv" button in the upper right corner
  4. Add Header columns (in my example: Code, Description, IsEnabled)
  5. Add a column with the following data: A1 Some description false (in edit mode) image
  6. After the final keystroke when writing the last column (false), stay with the mouse on this column and press CTRL+s
  7. Column with data "false" in not stored to the actual CSV file (after pressing CTRL+s) image

GIF:

edit-csv-bug

janisdd commented 2 years ago

Actually this is by design... you are still in cell-edit mode. You need to click into another cell, press tab/enter or something that changes the focused cell. If you press esc you can cancel the cell edit.

janisdd commented 2 years ago

Thinking about this again, it might be useful to have this to not unexpectedly lose changes. After pressing ctrl/cmd+s the cell editor should commit the change (https://handsontable.com/docs/6.2.2/tutorial-cell-editor.html).

This will ship with the next update.