Browse Source

DirListing: Allow for no sorting when clicking on headers (#10236)

martinRenou 4 years ago
parent
commit
6a03b05075
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/filebrowser/src/listing.ts

+ 2 - 2
packages/filebrowser/src/listing.ts

@@ -1747,7 +1747,7 @@ export namespace DirListing {
      *
      * @returns The sort state of the header after the click event.
      */
-    handleHeaderClick(node: HTMLElement, event: MouseEvent): ISortState;
+    handleHeaderClick(node: HTMLElement, event: MouseEvent): ISortState | null;
 
     /**
      * Create a new item node for a dir listing.
@@ -1869,7 +1869,7 @@ export namespace DirListing {
      *
      * @returns The sort state of the header after the click event.
      */
-    handleHeaderClick(node: HTMLElement, event: MouseEvent): ISortState {
+    handleHeaderClick(node: HTMLElement, event: MouseEvent): ISortState | null {
       const name = DOMUtils.findElement(node, NAME_ID_CLASS);
       const modified = DOMUtils.findElement(node, MODIFIED_ID_CLASS);
       const state: ISortState = { direction: 'ascending', key: 'name' };