microsoft / AzureStorageExplorer

Easily manage the contents of your storage account with Azure Storage Explorer. Upload, download, and manage blobs, files, queues, tables, and Cosmos DB entities. Gain easy access to manage your virtual machine disks. Work with either Azure Resource Manager or classic storage accounts, plus manage and configure cross-origin resource sharing (CORS) rules.
Creative Commons Attribution 4.0 International
372 stars 85 forks source link

The items are not sorted by the first visible column if hide the default first column #8014

Closed v-kellyluo closed 2 months ago

v-kellyluo commented 3 months ago

Storage Explorer Version: 1.35.0-dev (98) Build Number: 20240620.3 Branch: main Platform/OS: Windows11/Windows 10/Linux Ubuntu 22.04 & MacOS Sonoma 14.5(Apple M1 Pro) Architecture: arm64/x64/x64/arm64 How Found: From running test cases Regression From: Previous release (1.34.0)

Steps to Reproduce

  1. Expand one storage account -> Tables.
  2. Open one table which contains entities.
  3. Click 'Customize Columns' -> Hide 'PartitionKey' column.
  4. Reopen the table.
  5. Check whether entities are sorted by 'RowKey' column.

Expected Experience

Entities are sorted by 'RowKey' column. image

Actual Experience

Entities are sorted by 'PartitionKey' column. image

Additional Context

This issue also reproduces for blobs/files.

craxal commented 2 months ago

Honestly, after some thought, I don't think we should fix this. We should not be rearranging items just because the current sort column isn't visible. For example, if I was sorting by partition key, then I hid the partition key, it would be pretty jarring if all my items were suddenly resorted by row key. If the user wants to sort by a different, visible column, all they have to do is click the header. Sort column and order is also persisted across sessions, now, so even more reason to leave it alone.