Adding option to sort columns using F3 key in SlickGrid. (#20897)

This commit is contained in:
Aasim Khan
2022-10-25 08:22:31 -07:00
committed by GitHub
parent ab958a2724
commit 4d5e9adbc1
8 changed files with 26 additions and 12 deletions

View File

@@ -102,7 +102,7 @@
"rxjs": "5.4.0",
"sanitize-html": "1.19.1",
"semver-umd": "^5.5.7",
"slickgrid": "github:Microsoft/SlickGrid.ADS#2.3.37",
"slickgrid": "github:Microsoft/SlickGrid.ADS#2.3.38",
"spdlog": "^0.13.0",
"tas-client-umd": "0.1.4",
"turndown": "^7.0.0",

View File

@@ -42,7 +42,7 @@
"sanitize-html": "1.19.1",
"semver-umd": "^5.5.7",
"spdlog": "^0.13.0",
"slickgrid": "github:Microsoft/SlickGrid.ADS#2.3.37",
"slickgrid": "github:Microsoft/SlickGrid.ADS#2.3.38",
"turndown": "^7.0.0",
"turndown-plugin-gfm": "^1.0.2",
"tas-client-umd": "0.1.4",

View File

@@ -30,7 +30,7 @@
"rxjs": "5.4.0",
"sanitize-html": "1.19.1",
"semver-umd": "^5.5.7",
"slickgrid": "github:Microsoft/SlickGrid.ADS#2.3.37",
"slickgrid": "github:Microsoft/SlickGrid.ADS#2.3.38",
"turndown": "^7.0.0",
"turndown-plugin-gfm": "^1.0.2",
"tas-client-umd": "0.1.4",

View File

@@ -416,9 +416,9 @@ semver-umd@^5.5.7:
resolved "https://registry.yarnpkg.com/semver-umd/-/semver-umd-5.5.7.tgz#966beb5e96c7da6fbf09c3da14c2872d6836c528"
integrity sha512-XgjPNlD0J6aIc8xoTN6GQGwWc2Xg0kq8NzrqMVuKG/4Arl6ab1F8+Am5Y/XKKCR+FceFr2yN/Uv5ZJBhRyRqKg==
"slickgrid@github:Microsoft/SlickGrid.ADS#2.3.37":
version "2.3.37"
resolved "https://codeload.github.com/Microsoft/SlickGrid.ADS/tar.gz/1de979b3cf66cee46846e5e0d2edbc938c8d6563"
"slickgrid@github:Microsoft/SlickGrid.ADS#2.3.38":
version "2.3.38"
resolved "https://codeload.github.com/Microsoft/SlickGrid.ADS/tar.gz/da030666877487c7407db928be3a28b5ce3668a2"
source-map@^0.6.1:
version "0.6.1"

View File

@@ -878,9 +878,9 @@ simple-get@^4.0.0:
once "^1.3.1"
simple-concat "^1.0.0"
"slickgrid@github:Microsoft/SlickGrid.ADS#2.3.37":
version "2.3.37"
resolved "https://codeload.github.com/Microsoft/SlickGrid.ADS/tar.gz/1de979b3cf66cee46846e5e0d2edbc938c8d6563"
"slickgrid@github:Microsoft/SlickGrid.ADS#2.3.38":
version "2.3.38"
resolved "https://codeload.github.com/Microsoft/SlickGrid.ADS/tar.gz/da030666877487c7407db928be3a28b5ce3668a2"
smart-buffer@^4.2.0:
version "4.2.0"

View File

@@ -335,6 +335,15 @@ export class TopOperationsTabView extends Disposable implements IPanelView {
}
}));
this._register(table.onKeyDown(e => {
if (e.event.key === 'F3') {
table.grid.sortColumnByActiveCell();
e.event.preventDefault();
e.event.stopPropagation();
}
}));
this._register(table.onContextMenu(e => {
let csvString = '';
let csvStringWithHeader = '';

View File

@@ -945,6 +945,11 @@ declare namespace Slick {
**/
public getSortColumns(): { columnId: string; sortAsc: boolean }[];
/**
* sorts the table by the active cell column values.
*/
public sortColumnByActiveCell(): void;
/**
* Updates an existing column definition and a corresponding header DOM element with the new title and tooltip.
* @param columnId Column id.

View File

@@ -9481,9 +9481,9 @@ slice-ansi@^2.1.0:
astral-regex "^1.0.0"
is-fullwidth-code-point "^2.0.0"
"slickgrid@github:Microsoft/SlickGrid.ADS#2.3.37":
version "2.3.37"
resolved "https://codeload.github.com/Microsoft/SlickGrid.ADS/tar.gz/1de979b3cf66cee46846e5e0d2edbc938c8d6563"
"slickgrid@github:Microsoft/SlickGrid.ADS#2.3.38":
version "2.3.38"
resolved "https://codeload.github.com/Microsoft/SlickGrid.ADS/tar.gz/da030666877487c7407db928be3a28b5ce3668a2"
smart-buffer@^4.2.0:
version "4.2.0"