-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sort glossary nodes and terms alphabetically
- Loading branch information
Chris Collins
authored and
Chris Collins
committed
Aug 1, 2022
1 parent
52a6be8
commit 3d618ea
Showing
6 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
datahub-web-react/src/app/entity/glossaryNode/ChildrenTab.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Entity, EntityType } from '../../../types.generated'; | ||
import EntityRegistry from '../EntityRegistry'; | ||
|
||
export function sortGlossaryNodes(entityRegistry: EntityRegistry, nodeA?: Entity | null, nodeB?: Entity | null) { | ||
const nodeAName = entityRegistry.getDisplayName(EntityType.GlossaryNode, nodeA); | ||
const nodeBName = entityRegistry.getDisplayName(EntityType.GlossaryNode, nodeB); | ||
return nodeAName.localeCompare(nodeBName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Entity, EntityType } from '../../../types.generated'; | ||
import EntityRegistry from '../EntityRegistry'; | ||
|
||
export function sortGlossaryTerms(entityRegistry: EntityRegistry, nodeA?: Entity | null, nodeB?: Entity | null) { | ||
const nodeAName = entityRegistry.getDisplayName(EntityType.GlossaryTerm, nodeA) || ''; | ||
const nodeBName = entityRegistry.getDisplayName(EntityType.GlossaryTerm, nodeB) || ''; | ||
return nodeAName.localeCompare(nodeBName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters