= ({
))}
- © {new Date().getFullYear()} Dassana.io, All Rights Reserved
+ © {new Date().getFullYear()} Dassana Inc /{' '}
+
+ Privacy
+
diff --git a/src/components/Table/types.ts b/src/components/Table/types.ts
index 123aaa7b..66a4abdd 100644
--- a/src/components/Table/types.ts
+++ b/src/components/Table/types.ts
@@ -149,6 +149,7 @@ interface ComponentColoredDotType extends PartialComponentType {
interface RenderPropsLink extends Pick {
buildHref: (record?: string, data?: Record) => string
isDisabled?: (record?: string, data?: Record) => boolean
+ sortBy?: ColumnTypes.string | ColumnTypes.number
}
interface ComponentLinkType extends PartialComponentType {
diff --git a/src/components/Table/utils.tsx b/src/components/Table/utils.tsx
index aaec1955..f38f3340 100644
--- a/src/components/Table/utils.tsx
+++ b/src/components/Table/utils.tsx
@@ -265,7 +265,6 @@ function applySort(
case component:
switch (column.format) {
case coloredDot:
- case link:
antDColumn.sorter = compareStrings(column)
break
@@ -273,6 +272,17 @@ function applySort(
antDColumn.sorter = compareIcons(column)
break
+ case link: {
+ const { renderProps = { sortBy: ColumnTypes.string } } =
+ column
+
+ antDColumn.sorter =
+ renderProps.sortBy === ColumnTypes.number
+ ? compareNumbers(column)
+ : compareStrings(column)
+ break
+ }
+
case tag:
antDColumn.sorter = compareTags(column)
break