Add Sort Advanced command with multi-column sort
Opens a modal with a text field supporting autocomplete of column names. Enter comma-separated column names in priority order; rows are sorted ascending using locale-aware numeric comparison, first by the first column, then by the second, and so on. Autocomplete filters to matching headers, excludes already-chosen columns, and supports keyboard navigation (arrows + enter). Co-authored-by: Shelley <shelley@exe.dev>
This commit is contained in:
parent
ae1d428e75
commit
ab2d281aad
5 changed files with 333 additions and 2 deletions
|
|
@ -25,6 +25,20 @@
|
|||
<input type="text" id="command-input" placeholder="Type a command..." />
|
||||
<div id="command-list"></div>
|
||||
</div>
|
||||
<div id="sort-modal" class="hidden">
|
||||
<div class="modal-title">Sort Advanced</div>
|
||||
<div class="modal-body">
|
||||
<label for="sort-columns-input">Columns (comma-separated, in priority order):</label>
|
||||
<div id="sort-input-wrap">
|
||||
<input type="text" id="sort-columns-input" placeholder="e.g. Name, Age, City" autocomplete="off" />
|
||||
<div id="sort-autocomplete" class="hidden"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
<button id="sort-cancel-btn" class="modal-btn">Cancel</button>
|
||||
<button id="sort-confirm-btn" class="modal-btn modal-btn-primary">Sort</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="overlay" class="hidden"></div>
|
||||
</div>
|
||||
<script src="./src/main.js" type="module"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue