From 69a0de695b96bbbf49fed686057fdcca673a51a7 Mon Sep 17 00:00:00 2001 From: DhivinX Date: Tue, 14 Jan 2025 21:57:54 +0100 Subject: [PATCH] types: update types for optional sorting functions --- types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts b/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts index 9b1c3afc5a..78fbc3b110 100644 --- a/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +++ b/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts @@ -21,6 +21,10 @@ export declare type TreeViewPluginConfiguration = { renderService?: ITreeViewRenderService; /** When true, will show indeterminate state for checkboxes when some but not all child nodes are checked */ showIndeterminate?: boolean; + /** Optional function to replace the default elevation sort function. The function should take two nodes and return -1, 0 or 1. */ + elevationSortFunction?: (node1: TreeViewNode, node2: TreeViewNode) => number; + /** Optional function to replace the default sort function. The function should take two nodes and return -1, 0 or 1. */ + defaultSortFunction?: (node1: TreeViewNode, node2: TreeViewNode) => number; }; /**