From 5232d09af520e12bc421cf19ae5d231a7e36cd4d Mon Sep 17 00:00:00 2001
From: ArtfulAzeria <146041757+ArtfulAzeria@users.noreply.github.com>
Date: Fri, 29 Sep 2023 18:17:48 +0000
Subject: [PATCH] feat: Better and more responsive tag behavior (#515)
---
docs/features/explorer.md | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/docs/features/explorer.md b/docs/features/explorer.md
index 91766a9..8937b25 100644
--- a/docs/features/explorer.md
+++ b/docs/features/explorer.md
@@ -75,7 +75,12 @@
Component.Explorer({
sortFn: (a, b) => {
if ((!a.file && !b.file) || (a.file && b.file)) {
- return a.displayName.localeCompare(b.displayName)
+ // sensitivity: "base": Only strings that differ in base letters compare as unequal. Examples: a ≠ b, a = á, a = A
+ // numeric: true: Whether numeric collation should be used, such that "1" < "2" < "10"
+ return a.displayName.localeCompare(b.displayName, undefined, {
+ numeric: true,
+ sensitivity: "base",
+ })
}
if (a.file && !b.file) {
return 1
--
Gitblit v1.10.0